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

Internet Explorer Firefox Opera Google Chrome Safari

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

加支付宝好友偷能量挖...


评论(0)网络
阅读(177)喜欢(1)JavaScript/Ajax开发技巧