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

setNamedItem Method

Internet Development Index

Adds an attribute to an element using an attributes collection.

Syntax

newretNode = attributes.setNamedItem(oNamedItem)

Parameters

oNamedItem Required. An attribute.

Return Value

Returns the previously existing attribute if it has the same name as the new attribute, otherwise null.

Remarks

An attribute that is set with this method does not have to apply to the element.

If an attribute with the same name is already present, it is replaced by the new attribute.

Example

The following example shows how to add an attribute to an element using the setNamedItem method.

<HTML>
<HEAD>
<SCRIPT>
function fnSetNamedItem(){
var nnm = myDIV.attributes;
var namedItem = document.createAttribute("title");
namedItem.value = "This is a ToolTip";
nnm.setNamedItem(namedItem);
}
</SCRIPT>
</HEAD>
<BODY onload="fnSetNamedItem();">
<DIV ID="myDIV">This DIV now has a ToolTip.</DIV>
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 6 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

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

Applies To

attributes
莱西市| 灯塔市| 兰溪市| 乐陵市| 泰兴市| 滦平县| 类乌齐县| 观塘区| 大渡口区| 广宁县| 汝阳县| 西乌珠穆沁旗| 台江县| 望城县| 汾阳市| 苍溪县| 延庆县| 威远县| 鄂温| 博白县| 正镶白旗| 平塘县| 定南县| 托里县| 宜春市| 楚雄市| 巩留县| 陈巴尔虎旗| 正阳县| 清水县| 交城县| 七台河市| 永州市| 平远县| 北川| 安宁市| 黄平县| 英德市| 宁乡县| 景洪市| 旬邑县|