Find out if an attribute has been specified or not:
The result of x will be:
The specified property returns true if the attribute is specified.
Returns true also if the attribute has been created but not been attached to an element yet.
Otherwise it returns false.
Property | |||||
---|---|---|---|---|---|
specified | Yes | Yes | Yes | Yes | Yes |
Return Value: | A Boolean, returns true if the attribute is specified, otherwise false |
---|---|
DOM Version | Core Level 1 |