Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
HTML and CSS
CSS Reference
Attributes
User Interface
 accelerator Property
-ms-accelerator Attribute | accelerator Property

Sets or retrieves a string that indicates whether the object represents a keyboard shortcut.

Syntax

HTML { -ms-accelerator : sIsAccessible }
Scripting[ sIsAccessible = ] object.style.accelerator [ = v ]

Possible Values

sIsAccessibleString that specifies or receives one of the following values.
false
Default. Object is not a keyboard shortcut.
true
Object is keyboard shortcut.

The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has a default value of false. The Microsoft Cascading Style Sheets (CSS) extension is not inherited.

DHTML expressions can be used in place of the preceding value(s). As of Internet Explorer 8, expressions are not supported in IE8 mode. For more information, see About Dynamic Properties.

Remarks

 New for Windows Internet Explorer 8 Internet Explorer 8. The -ms-accelerator attribute is an extension to CSS, and can be be used as a synonym for accelerator in IE8 mode.

This property is supported by Microsoft Windows 2000 and later, which enables users to hide navigation indicators for menu items and controls until the ALT key is pressed.

An accelerator key is a single character used as a keyboard shortcut for selecting an object. Press and hold the ALT key followed by the character to move input focus and invoke the default event associated with an object.

Example

This example uses the -ms-accelerator attribute in a u element to specify that the N in the label element is a keyboard shortcut. When the option to "Hide keyboard navigation indicators until I use the Alt key" is enabled in the user's Display Properties, the N is not underlined until the user presses the ALT key. When ALT+N is pressed, the input element that defines an accessKey attribute value of 'N' receives the focus.

<LABEL FOR="oName"><U STYLE="ACCELERATOR:true">N</U>ame: </LABEL>
<INPUT TYPE="text" 	
    ID="oName" 
    SIZE="25"
    ACCESSKEY="N" 
    VALUE="Your name here">

Standards Information

There is no public standard that applies to this property.

Applies To

A, ABBR, ACRONYM, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BODY, CENTER, CITE, CODE, currentStyle, CUSTOM, DD, defaults, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, hn, I, IFRAME, INS, KBD, LABEL, LEGEND, LI, LISTING, MENU, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, XMP, CSSCurrentStyleDeclaration Constructor, CSSRuleStyleDeclaration Constructor, CSSStyleDeclaration Constructor

See Also

accessKey
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker