HTML DOM isId property
Examples
Check whether the ID attribute attribute element:
document.getElementById("demo").attributes[0].isId;
Output:
true
try it"
Definition and Usage
If the property is of type ID (for example, contains the element to which it belongs identifier), the isId property returns true, otherwise returns false.
Browser Support
In addition to Internet Explorer and Opera browser, the other major browsers support isId property.
grammar
attribute .isId
technical details
return value: | Boolean, true | false |
---|---|
DOM version | Core Level 3 |