Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <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 1 month (each time you click).</p> <p><strong>Note:</strong> This is the same as clicking the down arrow on the right side of the date field for the "month" section.</p> <button onclick="myFunction()">Try it</button> <p><strong>Note:</strong> The stepDown() method is not supported by Internet Explorer.</p> <p><strong>Note:</strong> input elements with type="month" are not supported in Internet Explorer or Firefox.</p> <script> function myFunction() { document.getElementById("myMonth").stepDown(); } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_month_stepdown2 by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:33:08 GMT --> </html>
Result:
Try it Yourself - © w3schools.com