How to Set accesskey assigned for Single Key Combination

Each element that can be activated or focused can be assigned a single key combination to activate it, using the accesskey attribute. The exact shortcut is determined by the user agent, based on information about the user's keyboard, what keyboard shortcuts already exist on the platform, and what other shortcuts have been specified on the page, using the information provided in the accesskey attribute as a guide. In order to ensure that a relevant keyboard shortcut is available on a wide variety of input devices, the author can provide a number of alternatives in the accesskey attribute.
The accesskey attribute's value is used by the user agent as a guide for creating a keyboard shortcut that activates or focuses the element.

If specified, the value must be an ordered set of unique space-separated tokens that are case-sensitive, each of which must be exactly one Unicode code point in length.
<a title="Consortium Activities" accesskey="A" href="/Consortium/activities">Activities</a> |
<a title="Technical Reports and Recommendations" accesskey="T" href="/TR/">Technical Reports</a> |
<a title="Alphabetical Site Index" accesskey="S" href="/Consortium/siteindex">Site Index</a> |
<a title="About This Site" accesskey="B" href="/Consortium/">About Consortium</a> |
<a title="Contact Consortium" accesskey="C" href="/Consortium/contact">Contact</a>

In the following example, the search field is given two possible access keys, "s" and "0" (in that order). A user agent on a device with a full keyboard might pick Ctrl+Alt+S as the shortcut key, while a user agent on a small device with just a numeric keypad might pick just the plain unadorned key 0:

<form action="/search">
<label>Search: <input type="search" name="q" accesskey="s 0"></label>
<input type="submit">

In the following example, a button has possible access keys described. A script then tries to update the button's label to advertise the key combination the user agent selected.

<input type=submit accesskey="N @ 1" value="Compose">
//your script here
function labelButton(button) {
if (button.accessKeyLabel)
button.value += ' (' + button.accessKeyLabel + ')';
var inputs = document.getElementsByTagName('input');
for (var i = 0; i < inputs.length; i += 1) {
if (inputs[i].type == "submit")

Related Topic What are all Common use of SSH for UNIX and Linux systems
How to Control the Position of Child Controls on Screen by Android Layout Managers
Object Life Cycle in Java
Single Thread Model in Servlet
Servlet Interview Questions & Answers Part 2 2011   Privacy Policy  Terms of Service  Feedback