最新国产好看的视频,伊人天堂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
瑞丽市| 岳西县| 虹口区| 大理市| 贡嘎县| 清镇市| 汤阴县| 瑞昌市| 凤庆县| 博湖县| 夏河县| 孝昌县| 两当县| 当阳市| 武安市| 宜宾县| 三门县| 尼勒克县| 正宁县| 合江县| 安平县| 宜丰县| 惠东县| 中方县| 竹北市| 博客| 扶绥县| 历史| 永济市| 都兰县| 惠来县| 邮箱| 稻城县| 河津市| 新乡县| 天门市| 浑源县| 徐汇区| 麻阳| 芮城县| 出国|