Input Month step Property - Get the legal month intervals: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Month

Description

Input Month step Property - Get the legal month intervals:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>
Month: <input type="month" id="myMonth" step="3">

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

<p id="demo"></p>

<script>
function myFunction() {//from  w w  w  . j  ava2  s  . c o m
    var x = document.getElementById("myMonth").step;
    document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>

Related Tutorials