Input Button disabled Attribute

Definition and Usage

disabled Attribute to set or return whether the input button should be disabled.

Disabled elements are not available and cannot be clicked. By default, disabled elements are usually displayed in gray in the browser.

This property reflects the HTML disabled attribute.

See also:

HTML Reference Manual:HTML <input> disabled এট্রিবিউট

Example

Example 1

Disable button:

document.getElementById("myBtn").disabled = true;

Try it yourself

Example 2

Check if the button is disabled:

var x = document.getElementById("myBtn").disabled;

Try it yourself

Example 3

Enable and disable button:

function disableBtn() {
    document.getElementById("myBtn").disabled = true;
}
function undisableBtn() {
    document.getElementById("myBtn").disabled = false;
}

Try it yourself

Syntax

Return disabled attribute:

buttonObject.disabled

set disabled attribute:

buttonObject.disabled = true|false

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

মান বর্ণনা
true|false

ইনপুট বাটনটিকে নিষ্ক্রিয় করা উচিত কি না নির্ধারণ

  • true - ইনপুট বাটন নিষ্ক্রিয়
  • false - ডিফল্ট।ইনপুট বাটন নিষ্ক্রিয় না

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

ফিরিয়ে দেওয়া মান: বুল মান, যদি ইনপুট বাটন নিষ্ক্রিয় থাকে, তবে ফিরিয়ে দেওয়া হবে trueঅন্যথায় ফিরিয়ে দেওয়া false

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

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