HotSpot.TabIndex 属性

定义

获取或设置 HotSpot 区域的选项卡索引。Gets or sets the tab index of the HotSpot region.

public:
 virtual property short TabIndex { short get(); void set(short value); };
public virtual short TabIndex { get; set; }
member this.TabIndex : int16 with get, set
Public Overridable Property TabIndex As Short

属性值

Int16

HotSpot 区域的选项卡索引。The tab index of the HotSpot region. 默认值为 0,指示未设置此属性。The default is 0, which indicates that this property is not set.

例外

指定的选项卡索引不在 -32768 和 32767 之间。The specified tab index is not between -32768 and 32767.

注解

使用 TabIndex 属性来指定或确定 HotSpot Web 窗体页上某个区域的选项卡索引。Use the TabIndex property to specify or determine the tab index of a HotSpot region on the Web Forms page.

按 TAB 键时,Web 服务器控件接收焦点的顺序取决于 TabIndex 每个控件的属性。When you press the TAB key, the order in which the Web server controls receive focus is determined by the TabIndex property of each control. 最初加载页面时,按 TAB 键时获得焦点的第一项是地址栏。When a page is initially loaded, the first item that receives focus when the TAB key is pressed is the address bar. 接下来,Web 窗体页上的控件将根据每个控件的属性的值以升序排列, TabIndex 从最小的非零值开始。Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the TabIndex property of each control, starting with the smallest positive, nonzero value. 如果多个控件共享同一个选项卡索引,则这些控件将按其在 Web 窗体页上的声明顺序接收焦点。If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. 最后,选项卡索引为零的控件按其声明顺序排列。Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

备注

只有具有非零选项卡索引的控件将呈现 tabindex 属性。Only controls with a nonzero tab index will render the tabindex attribute.

您可以 HotSpot 通过将属性设置为负值来从 tab 键顺序中删除区域 TabIndexYou can remove a HotSpot region from the tab order by setting the TabIndex property to a negative value.

备注

只有 Internet Explorer 4.0 和更高版本支持此属性。This property is supported only in Internet Explorer 4.0 and later.

适用于

另请参阅