HTML <keygen> disabled Attribute
The HTML <keygen> disabled attribute is a boolean attribute that indicates whether the <keygen> element is disabled or not. It is used to keep a user from using an input field until some conditions would be applied to it.
Note: We can use JavaScript to change the value of the disabled <keygen> element.
Syntax:
<keygen disabled>
Example: The below code illustrates the disabled attribute.
HTML
<!DOCTYPE html> < html > < body > < center > < h1 style = "color:green;" > w3wiki </ h1 > < h2 >HTML Keygen disabled attribute</ h2 > < form > Username: < input type = "text" name = "uname" > < br >< br > Password: < input type = "text" >< br > Encryption Element Value: < keygen form = "myBeginner" name = "secure" disabled> < br >< input type = "submit" > </ form > </ center > </ body > </ html > |
Output:
Supported Browsers:
- Google Chrome
- Firefox
- Opera
- Apple Safari