Option disabled attribute
Definition and Usage
disabled
Whether the attribute should set or return whether the option in the dropdown list should be disabled.
Disabled elements are not available and cannot be clicked. By default, disabled elements are usually displayed in gray in the browser.
See also:
HTML Reference Manual:HTML <option> disabled প্রতিভাত
HTML Reference Manual:HTML <option> ট্যাগ
Example
Example 1
Disable the third option (index 2) in the dropdown list:
document.getElementById("pets").options[2].disabled = true;
Example 2
Check if the second option (index 1) in the dropdown list is disabled:
var x = document.getElementById("pets").options[1].disabled;
Syntax
return disabled attribute:
optionObject.disabled
set disabled attribute:
optionObject.disabled = true|false
প্রতিভাত মান
মান | বর্ণনা |
---|---|
true|false |
নিষ্ক্রিয় করা হবে কিনা ড্রপডাউন লিস্টটি অপশনকে নির্দিষ্ট করা হয়
|
প্রযুক্তিগত বিবরণ
ফলাফল | বুলীয়ান মান, যদি অপশন নিষ্ক্রিয় থাকে তবে true ফিরাবে; না তবে false ফিরাবে。 |
---|
ব্রাউজার সমর্থন
চ্রোম | এডজ | ফায়ারফক্স | স্যাফারি | ওপেরা |
---|---|---|---|---|
চ্রোম | এডজ | ফায়ারফক্স | স্যাফারি | ওপেরা |
সমর্থন | সমর্থন | সমর্থন | সমর্থন | সমর্থন |