javascript Attr name

name NN 6 IE 5 DOM 1  

 

Read-only  

This is the name portion of the name/value pair of the attribute. It is identical to the nodeName property of the Attr node. You may not modify the name of an attribute by script because other dependencies may lead to document tree confusion. Instead, replace the old attribute with a newly created one, the name of which is a required parameter of the document.createAttribute() method.

 
Example
 
if (myAttr.name == "author") {
    // process author attribute
}
 
Value

String value.

 
Default

Empty string, although creating a new attribute requires a name.


284,Nickname,Homepage or email,Comments here,Add comment