Javascript examples for DOM HTML Element:Input Number
Input Number min Property - Change the minimum value:
<!DOCTYPE html> <html> <body> Quantity:/* www.j a v a 2 s . c o m*/ <input type="number" id="myNumber" min="1" max="10"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() { document.getElementById("myNumber").min = "5"; document.getElementById("demo").innerHTML = "The value of the min attribute was changed from '1' to '5'."; } </script> </body> </html>