Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML - How can I create an increment/decrement textbox on an HTML page?

How can i create a increment/decrement text box in HTML Page using jquery or Javascript.... The image are given below

and also i want to set maximum and minimum values....

How to i achieve this?

like image 209
Manikandan Sethuraju Avatar asked Aug 31 '12 05:08

Manikandan Sethuraju


People also ask

How do I make an increment decrement in HTML?

The stepUp() method increments the value of the number field by a specified number. Tip: To decrement the value, use the stepDown() method.


2 Answers

Just try

<input type="number" name="points" step="1">

that's it. In the step, you can enter any value you want. And the arrows will move that many steps on clicking.

like image 125
shubhankar raj Avatar answered Oct 23 '22 09:10

shubhankar raj


did you try input type="number"?

like image 25
simoncereska Avatar answered Oct 23 '22 10:10

simoncereska