HTMLDOM属性
Attrオブジェクト
HTML DOMでは、AttrオブジェクトはHTML属性を表します。
HTML属性は、常にHTML要素に属します。
NamedNodeMapオブジェクト
HTML DOMでは、NamedNodeMapオブジェクトは、要素属性ノードの順序付けられていないコレクションを表します。
NamedNodeMapのノードには、名前またはインデックス(番号)でアクセスできます。
属性のプロパティとメソッド
Property | Description |
---|---|
isId | Deprecated |
name | Returns an attribute's name |
value | Sets or returns an attribute's value |
specified | Returns true if the attribute is specified |
NamedNodeMapのプロパティとメソッド
Method | Description |
---|---|
getNamedItem() | Returns an attribute node (by name) from a NamedNodeMap |
item() | Returns an attribute node (by index) from a NamedNodeMap |
length | Returns the number of attributes in a NamedNodeMap |
removeNamedItem() | Removes an attribute (node) |
setNamedItem() | Sets an attribute (node) by name |