Search w3schools.com:

SHARE THIS PAGE

DOM Attr Object


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


Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]