Attribute对象参考
Definition and Usage
The Attr object represents an attribute in the HTML document.
An attribute always belongs to an element object.
Note: The Attr object can also use the properties and methods of the Node object.
Browser Support
The Attr object is supported in all major browsers.
Attr Object Properties
The "DOM" column indicates in which DOM Level the property was introduced.
Property | Description | DOM |
---|---|---|
isId | Returns true if the attribute is of type ID, otherwise it returns false | 3 |
name | Returns the name of the attribute | 1 |
ownerElement | Returns the element this attribute belongs to | 2 |
schemaTypeInfo | Returns the type information of the attribute | 3 |
specified | Returns true if the attribute has been specified, otherwise it returns false | 1 |
value | Sets or returns the value of the attribute | 1 |
加支付宝好友偷能量挖...