Input Date defaultValue Property

Definition and Usage

The defaultValue property sets or returns the default value of a date field.

Note: The default value is the value specified in the HTML value attribute.

The difference between the defaultValue and value property, is that defaultValue contains the default value, while value contains the current value after some changes have been made. If there are no changes, defaultValue and value is the same (see « More Examples » below).

The defaultValue property is useful when you want to find out whether the date field have been changed.

Vous aimerez aussi...