Select size attribute

Definition and Usage

size Attribute to set or return the size of the dropdown list Size attribute Value.

The size attribute specifies the number of visible options in the dropdown list.

Note:In Chrome and Safari, the size attribute may not work properly for size="2" and size="3".

See also:

HTML Reference Manual:HTML <select> size এট্রিবিউট

HTML Reference Manual:HTML <select> ট্যাগ

Example

Example 1

Change the number of visible options in the dropdown list:

document.getElementById("mySelect").size = "4";

Try it yourself

Example 2

Return the number of visible options in the dropdown list:

var x = document.getElementById("mySelect").size;

Try it yourself

Syntax

Return size attribute:

selectObject.size

set size attribute:

selectObject.size = number

এট্রিবিউট মান

মান বর্ণনা
number

ড্রপডাউন লিস্টে দেখা যাওয়া অপশনের সংখ্যা নির্ধারণ করুন。

যদি এই মান ১ থেকে কম হয়, কিন্তু লিস্টের অপশনের সংখ্যা থেকে বেশি, তবে ব্রাউজার একটি স্ক্রোল টিকট যোগ করবে, যার মাধ্যমে আরও অপশনগুলি দেখা যাবে。

প্রযুক্তিগত বিবরণ

ফলাফল: সংখ্যা, যা ড্রপডাউন লিস্টে দেখা যাওয়া অপশনের সংখ্যা।

ব্রাউজার সমর্থন

চ্রোম এডজ ফায়ারফক্স স্যাফারি অপেরা
চ্রোম এডজ ফায়ারফক্স স্যাফারি অপেরা
সমর্থন সমর্থন সমর্থন সমর্থন সমর্থন