HBCMS更多的中文手册参考:

ACCESSKEY Attribute | accessKey参数属性

DHTML文档教程

Sets or retrieves the accelerator key for the object.

dhtml语法

HTML<ELEMENT ACCESSKEY = sAccessKey... >
Scriptingobject.accessKey [ = sAccessKey ]

DHTML可能的值

sAccessKeyString that specifies or receives a key on an alphanumeric keyboard.

The property is read/write. The property has no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.

remarks

by default, the accesskey property sets focus to the object. the object receives focus when the user simultaneously presses the alt key and the accelerator key assigned to an object. some controls perform an action after receiving focus. for example, using accesskey on a input type=button causes the onclick event to fire. by comparison, applying the accesskey on a radio button causes the onclick event to fire and toggles the checked property, visibly selecting or deselecting the control.

as of microsoft® internet explorer 5, some scoped elements do not implicitly support the accesskey property. instead, they support the property by setting the tabindex attribute to any valid negative or positive integer.

Note  For elements that are not tab stops by default, such as a span, the tabindex property must be set on the element for the accesskey property to function.

DHTML代码范例

This example uses the label object and the accesskey property to set focus on a text box. the rich text support in the label object makes it possible to underline the designated accesskey.

<label for="fp1" accesskey="1">#<span style="text-decoration:underline;">1</SPAN>:
Press Alt+1 to set focus to textbox</LABEL>
<INPUT TYPE="text" NAME="T1" VALUE=text1 SIZE="20"
TABINDEX="1" ID="fp1">
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

是否符合公共标准

This property is defined in HTML 4.0 Non-Microsoft link and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

A, ACRONYM, ADDRESS, APPLET, AREA, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CUSTOM, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, hn, HR, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP