Option defaultSelected attribute
Definition and Usage
defaultSelected
attribute returns selected attribute the default value.
If the default selected option is selected, this property returns true
, otherwise return false
.
Note:If an option is selected by default, it is displayed first in the dropdown list.
See also:
HTML Reference Manual:HTML <option> အချက်အလက်
Example
Check if the selected option is selected by default:
var x = document.getElementById("mySelect").selectedIndex; var y = document.getElementsByTagName("option"); alert("Is " + y[x].text + " selected by default? " + y[x].defaultSelected);
ပြောင်းလဲမှု
optionObject.defaultSelected
နည်းပါး အချက်
အပြန်လည် အမှတ် | ဘောလုံး အမှတ်၊ အခြား အခြေခံ သတ္တုပုံ အား အားလုံး သတ်မှတ်ထားသည်။ အခြား အခြေခံ သတ္တုပုံ အား အားလုံး သတ်မှတ်ထားသည်။ |
---|
ဘတ်သျား အကူအညီ
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
အကူအညီ | အကူအညီ | အကူအညီ | အကူအညီ | အကူအညီ |