HTML DOM accessKey property
Definition and Usage
The accessKey property sets or returns the shortcut key for accessing a radio button.
Note: Please use the Alt + accessKey Give focus to the element with the specified shortcut key.
Syntax
HTMLElementObject.accessKey=
accessKey
Browser support





All major browsers support the accessKey property
Example
Example
The following example returns the shortcut key of the radio button:
<!DOCTYPE html><html>
<head>
<meta charset="utf-8">
<title>Runoob Tutorial(runoob.com)
title
<
script
function accesskey(){ document.getElementById('runoob').accessKey="r" document.getElementById('g').accessKey="g" }
script
head
<body onload="accesskey()">
<a id="runoob" href="//www.runoob.com/">Runoob Tutorial
a
<br>
<a id="g" href="//www.google.com/" Google a>
<p>
<b>Note:
b
Use Alt +
<
i
accesskey
iAccess the element with the specified access key.
p
body
html
Try it »
Element object