Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

-ms-accelerator property

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

Syntax

-ms-accelerator: false | true

Property values

false

Default. Object is not a keyboard shortcut.

true

Object is keyboard shortcut.

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Value

Remarks

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

An access 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.

Examples

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.


<!DOCTYPE html>

<html>
<head>
  <title>Accelerator</title>
</head>
<body>
  <label for="oName"><u style="-ms-accelerator: true; accelerator: true">N</u>ame: </label>
  <input type="text"
    id="oName"
    size="25"
    accesskey="N"
    value="Your name here" />
</body>
</html>

See also

CSSStyleDeclaration
currentStyle
defaults
runtimeStyle
style
accessKey

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.