Input Email disabled attribute
Definition and usage
disabled
Attribute sets or returns whether the email 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 Attribute
Example
Example 1
Disable the email field:
document.getElementById("myEmail").disabled = true;
Example 2
Determine whether the email field is disabled:
var x = document.getElementById("myEmail").disabled;
Example 3
Disable and enable the email field:
function disableBtn() { document.getElementById("myEmail").disabled = true; } function undisableBtn() { document.getElementById("myEmail").disabled = false; }
Syntax
Return the disabled attribute:
emailObject.disabled
Set the disabled attribute:
emailObject.disabled = true|false
Attribute value
Value | Description |
---|---|
true|false |
Whether the email field should be disabled.
|
Technical Details
Return Value: | Boolean value, returned if the email field is disabled true ; otherwise return false . |
---|
Browser Support
The numbers in the table indicate the first browser version that fully supports this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | Support | Support |