HTML DOM removeNamedItem () method
Examples
Delete type property of a button:
var btn=document.getElementsByTagName("INPUT")[0];
btn.attributes.removeNamedItem("type");
Delete Attribute ago:
Remove property:
try it"
Definition and Usage
emoveNamedItem () method removes the specified node.
Browser Support
All major browsers support removeNamedItem () method
NOTE: In Internet Explorer 8 and earlier versions of IE, when removeNamedItem () method to delete the attribute, this method can not remove the property, but can return the property value.
grammar
namednodemap.removeNamedItem( nodename )
parameter
参数 | 类型 | 描述 |
---|---|---|
nodename | String | 必须,节点列表中你要删除的节点名。 |
return value
类型 | 描述 |
---|---|
节点对象 | 移除的节点 |
technical details
DOM version | Core Level 1 |
---|