javascript Attr specified
@March 15, 2008, 1:22 a.m.
specified | Firefox/Netscape/NN 6 IE 5 Chrome/Safari/DOM 1 |
Read-only | |
Returns Boolean true if the value of the attribute is explicitly assigned in the source code or adjusted by script. If the browser reflects an attribute that is not explicitly set (IE does this), the specified property for that value is false, even though the attribute may have a default value determined by the document's DTD. The W3C DOM Level 2 indicates that the specified property of a freshly created Attr object should be true, but both IE 6 and Netscape 6.2 and later leave it false until the attribute is inserted into an element. |
|
Example | |
if (myAttr.specified) { // process attribute whose value is something other than DTD default } |
|
Value | |
Boolean value: true | false. |
|
Default | |
false |
Permanent URL:
http://javascript.gakaa.com/attr-specified.aspx
Powered by Linode.