最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

selectedIndex Property

Internet Development Index

Sets or retrieves the index of the selected option in a select object.

Syntax

HTMLN/A
ScriptingSELECT.selectedIndex [ = iIndex ]

Possible Values

iIndexInteger that specifies or receives the index.

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

Options in a select object are indexed in the order in which they are defined, starting with an index of 0. When you set the selectedIndex property, the display of the select object updates immediately.

The selectedIndex property returns -1 if a select object does not contain any selected items. Setting the selectedIndex property clears any existing selected items.

The selectedIndex property is most useful when used with select objects that support selecting only one item at a time—that is, those in which the MULTIPLE attribute is not specified. If the MULTIPLE attribute is specified for a select object, the selectedIndex property returns only the index of the first selected item, if any.

The selected property is most useful when used with select objects that support selecting more than one item at a time—that is, those in which the MULTIPLE attribute is specified. You can use the selected property to determine whether an individual item in a select object is selected. In addition, selected items are not cleared when the selected property is set. This allows multiple items in the list to be selected at the same time.

Example

This example uses the selectedIndex property to retrieve individual values from a select object. When a site is selected from the list, the browser displays the associated page.

<SELECT onchange="window.location.href=this.options
[this.selectedIndex].value">
<OPTION VALUE="http://www.microsoft.com/ie">
Internet Explorer</OPTION>
<OPTION VALUE="http://www.microsoft.com">
Microsoft Home</OPTION>
<OPTION VALUE="http://msdn.microsoft.com">
Developer Network</OPTION>
</SELECT>

Standards Information

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

Applies To

SELECT
平塘县| 从江县| 彰武县| 乌兰浩特市| 黔南| 克什克腾旗| 运城市| 延安市| 深州市| 江川县| 无锡市| 江津市| 邯郸县| 罗田县| 当雄县| 静海县| 海阳市| 汝阳县| 九台市| 定南县| 宁乡县| 南木林县| 新兴县| 辽宁省| 余姚市| 五莲县| 衡山县| 沭阳县| 常宁市| 离岛区| 平顺县| 洛川县| 贵德县| 纳雍县| 江西省| 佛教| 卢龙县| 拜城县| 禹城市| 绥江县| 武川县|