Displaying Access Key Information in Buttons

Users can activate text size adjustment using access keys. This capability is easy to advertise using form buttons or text links.




Over 2000+ free Javascript
at JavaScriptBank.com Website

Sampled by JavaScriptBank.com

This is accomplished using styles and the accesskey attribute. For example, the Increase button is set up as follows:

<button type="button"
 onclick="dw_fontSizer.adjust(2)"
 accesskey="i"><span>I</span>ncrease</button>

The style rule to underline the access key is as follows:

#sizer button span { border-bottom: 1px solid #fff }