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

item Method

Internet Development Index

Retrieves an attribute for an element from the attributes collection.

Syntax

oItem = attributes.item(vIndex)

Parameters

vIndex Required. Integer or String that specifies the attribute. If this parameter is an integer, it is the zero-based index of the attribute in the attributes collection. If this parameter is a string, the attribute whose name matches the string is retrieved.

Return Value

Returns an attribute if successful, otherwise null.

Remarks

This method returns an error if the attribute is not found. When retrieving an attribute by name, vIndex must match the case of the attribute.

Examples

This example uses the item method to retrieve the name and value of each attribute for an element and whether it has been specified.

<HTML>
<HEAD>
<SCRIPT>
function Init()
{
oAttrColl = oElem.attributes;
for (i = 0; i < oAttrColl.length; i++)
{
oAttr = oAttrColl.item(i);
bSpecified = oAttr.specified;
sName = oAttr.nodeName;
vValue = oAttr.nodeValue;
alert(sName + ": " + bSpecified + ": " + vValue);
}
}
</SCRIPT>
</HEAD>
<BODY ONLOAD="Init()">
<P ID="oElem">An element.</P>
</BODY>
</HTML>

Standards Information

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

Applies To

attributes
姚安县| 铁岭县| 花莲县| 夏邑县| 博罗县| 普定县| 安义县| 靖安县| 昌乐县| 南乐县| 通辽市| 灵丘县| 喜德县| 青田县| 平定县| 宾川县| 象山县| 浪卡子县| 和田县| 鄢陵县| 历史| 广安市| 密山市| 什邡市| 海伦市| 兴文县| 苏州市| 桂阳县| 甘德县| 洪泽县| 西林县| 呼图壁县| 电白县| 镇赉县| 邛崃市| 刚察县| 丰台区| 黔江区| 宁强县| 南涧| 柳林县|