Attribute.specified (Property)

Whether the value has been specified or not.

Availability:

DOM level - 1
JavaScript - 1.5
JScript - 5.0
Internet Explorer - 5.0
Netscape - 6.0
Property/method value type:Boolean primitive
JavaScript syntax:-myAttribute.specified

This flag indicates whether the attribute is defined or not. This property is updated automatically when you change the value of a property belonging to an Element object.

The attribute contains a meaningful value only if this property is set to true. If it is set to false, the other properties belonging to the Attributes object don't hold any useful information.

The result is true if the value is specified by an HTML tag attribute and false if it is not currently specified.

Property attributes:

ReadOnly.