Javascript Reference
Categories: InputTypeText

javascript InputTypeText defaultValue

@March 15, 2008, 1:22 a.m.
defaultValueFirefox/Netscape/NN 2 IE 3 Chrome/Safari/DOM 1  

Read-only  

The default text for the text input element, as established by the value attribute.

 
Example
 
var txtObj = document.forms[0].myText;
if (txtObj.value != txtObj.defaultValue ) {
    ...
}
 
Value

String value.

 
Default

None.


Powered by Linode.