最新国产好看的视频,伊人天堂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
永平县| 大姚县| 新竹市| 卓资县| 安溪县| 丘北县| 杭锦后旗| 鹿邑县| 凤台县| 陵川县| 耒阳市| 巴彦淖尔市| 贺州市| 叶城县| 石景山区| 永康市| 夹江县| 称多县| 常州市| 彰武县| 武穴市| 咸宁市| 藁城市| 娄底市| 霍林郭勒市| 右玉县| 黔西| 京山县| 墨江| 甘南县| 四川省| 旌德县| 务川| 苏尼特右旗| 博客| 夏津县| 邯郸县| 青河县| 浦东新区| 蚌埠市| 湘潭县|