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=button
input type=checkbox
input type=file
input type=hidden
input type=image
input type=password
input type=radio
input type=reset
input type=submit
input type=text
textArea
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]