HTML DOM Input Email disabled property
Examples
Disable email field:
. Document.getElementById ( "myEmail") disabled = true;
Output:
try it"
Definition and Usage
disabled property sets or returns the email field is disabled.
Use the disabled attribute elements are not available and can not be clicked. Disabled elements are usually displayed on the browser gray.
This property reflects the HTML disabled property.
Browser Support
All major browsers support the disabled attribute.
Note: Internet Explorer 9 (and earlier versions of IE), or Safari browser does not support type = "email" in the HTML <input> elements.
grammar
Returns disabled properties:
emailObject .disabled
Set the disabled attribute:
emailObject .disabled = true | false
Property Value
value | description |
---|---|
true | false | Description email field is available.
|
technical details
return value: | Boolean value that, if the email field is unavailable returns true, false otherwise |
---|
More examples
Examples
Check email fields are available:
var x = document.getElementById ( "myEmail") disabled.;
x The output is: true
try it"
Examples
Disable or enable email field:
function disableBtn () {
. Document.getElementById ( "myEmail") disabled = true;
}
function undisableBtn () {
. Document.getElementById ( "myEmail") disabled = false;
}
. Document.getElementById ( "myEmail") disabled = true;
}
function undisableBtn () {
. Document.getElementById ( "myEmail") disabled = false;
}
try it"
Related Pages
HTML Reference Manual: HTML <the INPUT> Disabled Property
Input Email Object