HTML DOM accessKey Property
Complete Password Object Reference
Definition and Usage
The accessKey property sets or returns a keyboard key to access a password
field.
Note: Use Alt + accessKey to give focus to the element with a
specified access key.
Syntax
passwordObject.accessKey=accessKey
|
Example
The following example returns the access key for a password field:
<html>
<body>
<form>
<input type="password" accesskey="p" id="password1" />
</form>
<p>AccessKey for password field is:
<script type="text/javascript">
x=document.getElementById('password1');
document.write(x.accessKey);
</script></p>
</body>
</html>
|
Try-It-Yourself Demos
Return the access key for a password field
Complete Password Object Reference
|