Javascript examples for DOM HTML Element:Input Number
Input Number stepDown() Method - Decrement the value of a number field by 1 (default):
<!DOCTYPE html> <html> <body> Number: <input type="number" id="myNumber"> <button onclick="myFunction()">Test</button> <script> function myFunction() {/* w w w.ja va 2s .c o m*/ document.getElementById("myNumber").stepDown(); } </script> </body> </html>