Skip to main content
defaultValue property

Sets or retrieves the initial contents of the object.



p = object.defaultValue


Property values

Type: String

the initial value of the object.

Standards information


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. It does, however, change the initial value of the object when the form is reset.

See also

input type=button
input type=checkbox
input type=email
input type=file
input type=hidden
input type=image
input type=number
input type=password
input type=radio
input type=range
input type=reset
input type=search
input type=submit
input type=tel
input type=text
input type=url