|
Attributes object
Represents attributes of DOM element.
To access attributes collection of the element use its attributes property: element.attributes
| Properties |
| length |
r |
integer, number of attributes of the element. Read-only property. |
| [index] |
rw |
string, value of attribute at the index position. Index here is either string (name of attribute) or integer (zero-based index of the attribute). Read-write index accessor. |
| Enumeration |
| for ... in |
for(var name in element.attributes) { /* loop body */ }
Executes body of the loop for attributes of the element. Value of name variable is text - name of the attribute. |
| Methods |
| name |
(index) returns: string
Returns string - name of the attribute at index position. Index is zero-based integer value here. |
| clear |
() returns: N/A
Clears collection of attributes of the element. |
| remove |
(index) returns: N/A
Removes attribute from the collection of attributes. Index here is either string (name of attribute) or integer (zero-based index of the attribute). |
|