HTML DOM specified attribute
Examples
Check whether the attribute has the value specified:
document.getElementById("demo").attributes[0].specified;
Output:
true
try it"
Definition and Usage
If you set the property value in the document, the specified property returns true, if the DTD / Schema default value, it returns false.
Browser Support
All major browsers support specified property
grammar
attribute .specified
technical details
return value: | Boolean, true | false |
---|---|
DOM version | Core Level 1 |