HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Input Week Object : Change the default value of a week field
The defaultValue property sets or returns the default value of a week field.
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 week of a week field have been changed.
Property | |||||
---|---|---|---|---|---|
defaultValue | Yes | 10.0 | Yes | Yes | Yes |
Return the defaultValue property:
Set the defaultValue property:
Value | Description |
---|---|
value | Specifies the default value of the week field |
Return Value: | A String, representing the default value of the week field |
---|
Get the default value of a week field:
var x = document.getElementById("myWeek").defaultValue;
An example that shows the difference between the defaultValue and value property:
var x = document.getElementById("myWeek");
var defaultVal = x.defaultValue;
var currentVal = x.value;
❮ Input Week Object