Sets an access key to an element.
The accessKey attribute is useful if you want to give the user an opportunity to set focus to an element using a keyboard shortcut. Activating an access key induces additional action for some controls, e.g. in case of button, input:button, input:checkbox and input:radio elements it simulates a mouse click, so it toggles the CHECKED state of input:checkbox and input:radio elements. Typically the form controls and the body object support the accessKey attribute. Some other elements also support this attribute, but only if the tabIndex attribute is also specified.
A single character from the keyboard.
Default: this attribute has no default value.
Example HTML code 1:
This example illustrates the use of the accessKey attribute:
Did you find this example helpful?
Supported by tags:
User Contributed Comments