အရွယ်အစား Property ကို ရွေး ပါ။
ဥပမာ
drop-down list တွင်မြင်နိုင်သောရွေးချယ်စရာအရေအတွက်ကိုပြောင်းပါ-
document.getElementById("mySelect").size = "4";
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
အရွယ်အစား ပိုင်ဆိုင်မှုသည် drop-down list တစ်ခု၏ size attribute ၏တန်ဖိုးကို သတ်မှတ်ပေးသည် သို့မဟုတ် ပြန်ပေးသည်။
size attribute သည် drop-down list တွင်မြင်နိုင်သောရွေးချယ်စရာအရေအတွက်ကိုသတ်မှတ်သည်။
မှတ်ချက်- Chrome နှင့် Safari တွင်၊ size ရည်ညွှန်းချက်သည် size="2" နှင့် size="3" အတွက် မျှော်လင့်ထားသည့်အတိုင်း အလုပ်မဖြစ်နိုင်ပါ။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
size | Yes | Yes | Yes | Yes | Yes |
အထားအသို
အရွယ်အစား ပိုင်ဆိုင်မှုကို ပြန်ပေးပါ။
selectObject.size
အရွယ်အစား ပိုင်ဆိုင်မှုကို သတ်မှတ်ပါ-
selectObject.size = number
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
number | Specifies the number of visible options in a drop-down list. If the value is greater than 1, but lower than the total number of options in the list, the browser will add a scroll bar to indicate that there are more options to view. |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | drop-down စာရင်းရှိ မြင်နိုင်သော ရွေးချယ်စရာ အရေအတွက်ကို ကိုယ်စားပြုသော နံပါတ် |
---|
နောက်ထပ် ဥပမာများ
ဥပမာ
drop-down list တွင်မြင်နိုင်သောရွေးချယ်စရာအရေအတွက်ကိုပြန်ပေးပါ။
var x = document.getElementById("mySelect").size;
ဆက်စပ်စာမျက်နှာများ
HTML ရည်ညွှန်း- HTML <select> size attribute
❮ Object ကို ရွေးပါ။