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

item Method

Internet Development Index

Retrieves an object from the all collection or various other collections.

Syntax

oItem = object.item(vIndex [, iSubindex])

Parameters

vIndex Required. Integer or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
iSubindex Optional. Integer爐hat specifies the zero-based index of the object to retrieve when a collection is returned.

Return Value

Returns an object or a collection of objects if successful, or null otherwise.

Remarks

The item method cannot retrieve input type=image elements from a form. To access all elements contained in a form, use the children collection.

Examples

The following example uses the item method to retrieve each object from the document. In this case, the method parameter is a number, so the objects are retrieved in the order they appear in the document.

<SCRIPT LANGUAGE="JScript">
var coll = document.all;
if (coll!=null) {
for (i=0; i<coll.length; i++)
alert(coll.item(i).tagName);
}
</SCRIPT>

The next example uses the item method to retrieve a collection of all objects in the document that have "Sample" as an ID. The example then uses item again to retrieve each object from the "Sample" collection.

<SCRIPT LANGUAGE="JScript">
var coll = document.all.item("Sample");
If (coll != null) {
for (i=0; i<coll.length; i++) {
alert(coll.item(i).tagName);
}
}
</SCRIPT>

The last example is similar to the previous example, but uses the optional iSubindex parameter of item to retrieve individual objects.

<SCRIPT LANGUAGE="JScript">
var coll = document.all.item("Sample")
if (coll!=null) {
for (i=0; i<coll.length; i++)
alert(document.all.item("Sample",i).tagName);
}
</SCRIPT>

Standards Information

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

Applies To

all, anchors, applets, areas, boundElements, cells, elements, embeds, forms, images, links, mimeTypes, options, plugins, rows, scripts, tBodies, FORM
武功县| 永州市| 舟曲县| 万源市| 衡南县| 海城市| 闵行区| 炎陵县| 长垣县| 江油市| 永平县| 墨脱县| 丘北县| 富顺县| 东莞市| 黑河市| 博乐市| 锦屏县| 资源县| 奈曼旗| 都江堰市| 喀什市| 马山县| 莎车县| 漯河市| 无极县| 玉山县| 息烽县| 杨浦区| 博野县| 九寨沟县| 双城市| 全椒县| 眉山市| 旅游| 正安县| 湖北省| 化隆| 宝山区| 平谷区| 陕西省|