Password disabledProperty
Password Object
Examples
Example 1
Disable password field:
<script>
document.getElementById("pwd").disabled=true;
</script>
document.getElementById("pwd").disabled=true;
</script>
Output:
Try it yourself »
Definition and Usage
The disabled property sets or returns whether the password field is disabled.
Disabled input elements are neither usable nor clickable. The disabled attribute can be set until some other condition is met (e.g., a checkbox is selected, etc.).
Syntax
Set the disabled property:
element.disabled=true|false
Return the disabled property:
element.disabled
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the disabled property.
Password Object Other Extensions