<html>
<body>
Month and year: <input type="month" id="myMonth" value="1997-11">
<p>Click the button to decrement the value of the month field by 3 months (each time you click).</p>
<button onclick="myFunction()">Try it</button>
<p><strong>Note:</strong> The stepDown() method is not supported by Firefox.</p>
<script>
function myFunction() {
document.getElementById("myMonth").stepDown(3);
}
</script>
</body>
</html>