Javascript examples for DOM HTML Element:Input Week
The stepDown() method decrements the WEEKS value of the week field by a specified number.
Parameter | Description |
---|---|
number | Required. Specifies the amount of weeks the week field should decrease. Default to "1" |
No return value
The following code shows how to Decrement the value of a week field by 10 weeks:
<!DOCTYPE html> <html> <body> <input type="week" id="myWeek" value="2014-W15"> <button onclick="myFunction()">Test</button> <script> function myFunction() {/*w ww . ja v a2 s . c o m*/ document.getElementById("myWeek").stepDown(10); } </script> </body> </html>