HTML DOM accessKey Property
Complete Anchor Object Reference
Definition and Usage
The accessKey property sets or returns a keyboard key to access a link.
Note: Use Alt + accessKey to give focus to the
element with the specified access key.
Syntax
anchorObject.accessKey=accessKey
|
Example
The following example sets the access key of the of the link:
<html>
<head>
<script type="text/javascript">
function accesskey()
{
document.getElementById('w3').accessKey="w"
}
</script>
</head>
<body onload="accesskey()">
<a id="w3" href="http://www.w3schools.com/">W3Schools.com</a>
</body>
</html>
|
Try-It-Yourself Demos
Add
accessKey to hyperlinks
Complete Anchor Object Reference
Learn XML with <oXygen/> XML Editor - Free Trial!
|
|
oXygen helps you learn to define,
edit, validate and transform XML documents. Supported technologies include XML Schema,
DTD, Relax NG, XSLT, XPath, XQuery, CSS.
Understand in no time how XSLT and XQuery work by using the intuitive oXygen debugger!
Do you have any XML related questions? Get free answers from the oXygen
XML forum
and from the video
demonstrations.
Download a FREE 30-day trial today!
|
|