defaultValue
Summary
Gets or sets the value of the value HTML attribute.
Property of dom/HTMLInputElementdom/HTMLInputElement
Syntax
var defaultValue = inputElement.defaultValue;
inputElement.defaultValue = value;
Return Value
Returns an object of type StringString
The value of the value HTML attribute.
Notes
The value of the property can be changed programmatically, but doing so has no effect on the appearance of the object or the submitted value - if the value property has been changed by a user or by a script. It does, however, change the initial value of the object when the form is reset.
Related specifications
- DOM Level 1
- Recommendation
See also
Related pages
input type=buttoninput type=checkboxinput type=fileinput type=hiddeninput type=imageinput type=passwordinput type=radioinput type=resetinput type=submitinput type=texttextArea
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]