HTML DOM specified Property
Example
Checks whether the attribute has a specified value:
document.getElementById("demo").attributes[0].specified;
Output result:
true
Try it »
Definition and Usage
If the attribute value is set in the document, the specified property returns true; if it is a default value from the DTD/Schema, it returns false.
Browser support





All major browsers support the specified property.
Syntax
attribute
.specified
Technical Details
| Return Value: | Boolean, true|false |
|---|---|
| DOM version | Core Level 1 |
Attribute object