ASP.NET AccessKeyProperty


Web 控件标准属性参考手册Web Control Standard Property Reference

Definition and Usage

The AccessKey property is used to set or return the keyboard key used to access a control.

Access keys allow users to use the keyboard to move focus to an input element.

In most browsers, access is invoked by pressing Alt (on a PC) or Ctrl (on a Mac) together with the accesskey character on the keyboard.

Syntax

<asp:webcontrol id="id" AccessKey="accessKey" runat="server" />
 
Property Description
AccessKey The character used to access the control.


Example

The following example sets an access key for a CheckBox:

<form runat="server">
<asp:CheckBox id="check1" AccessKey="y" runat="server" />
</form>

Show example »

Web 控件标准属性参考手册Web Control Standard Property Reference Other Extensions