Javascript examples for DOM HTML Element:Input Month
Input Month stepDown() Method - Decrement the value of a month field by 1 (default):
<!DOCTYPE html> <html> <body> Month and year: <input type="month" id="myMonth" value="1997-11"> <button onclick="myFunction()">Test</button> <script> function myFunction() {/*from ww w.j a va2 s .c o m*/ document.getElementById("myMonth").stepDown(); } </script> </body> </html>