Input Password disabled attribute

Definition and Usage

disabled Attribute to set or return whether the password field 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 the password field:

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

Try it yourself

Example 2

Check if the password field is disabled:

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

Try it yourself

Example 3

Disable and enable the password field:

function disablePsw() {
  document.getElementById("myPsw").disabled = true;
}
function undisablePsw() {
  document.getElementById("myPsw").disabled = false;
}

Try it yourself

Syntax

Return disabled attribute:

passwordObject.disabled

set disabled attribute:

passwordObject.disabled = true|false

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

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

পাসওয়ার্ড ফিল্ডটিকে নিষ্ক্রিয় করা উচিত কি না নির্ধারণ করে

  • true - পাসওয়ার্ড ফিল্ড নিষ্ক্রিয়
  • false - ডিফল্ট।পাসওয়ার্ড ফিল্ড নিষ্ক্রিয় না

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

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

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

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