HTML DOM isId Property
Example
Checks whether the attribute is the element's ID attribute:
document.getElementById("demo").attributes[0].isId;
Output result:
true
Try it »
Definition and Usage
If the attribute is of ID type (for example, it contains the identifier of the element it belongs to), the isId property returns true; otherwise it returns false.
Browser support





All other major browsers except Internet Explorer and Opera support the isId property.
Syntax
attribute
.isId
Technical Details
| Return Value: | Boolean, true|false |
|---|---|
| DOM version | Core Level 3 |
Attribute object