<html>
<body>
Week: <input type="week" id="myWeek" step="3">
<p>Click the button to display the value of the step attribute of the week field.</p>
<button onclick="myFunction()">Try it</button>
<p><strong>Note:</strong> input elements with type="week" are not supported in Internet Explorer or Firefox.</p>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myWeek").step;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_week_step2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 05 Sep 2022 15:53:07 GMT -->
</html>