Input Week stepUp() Method - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Week

Description

The stepUp() method increments the WEEKS value of the week field by a specified number.

Parameter Values

Parameter Description
numberRequired. Specifies the amount of weeks the week field should increase. Default to "1"

Return Value:

No return value

The following code shows how to Increment the value of a week field by 10 weeks:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<input type="week" id="myWeek" value="2014-W15">

<button onclick="myFunction()">Test</button>

<script>
function myFunction() {//from  ww  w . jav a2s  . co m
    document.getElementById("myWeek").stepUp(10);
}
</script>

</body>
</html>

Related Tutorials