I've to add in my page -dynamically- a input range like this:
<div id="input_div">
<input type="button" value="-" onclick="minus()">
<input name="order" type="number" min="0" max="30" size="10" range="1" value="1" id="count1">
<input type="button" value="+" onclick="plus()">
</div>
<div id="wrapper"></div>
<a href="#" id="add-inputs">ADD</a>
And i've to add and remove numbers of that input.
For example the first input has id=count1, if I click on the "plus" button it has to increment its value. But if i had another input with id=count2 and i click on the "plus" button it has to increment the value of the second input with id=count2 and it shouldn't change the first input with id=count1.
And then I don't know how to add and remove inputs.
So two questions:
- How to add many inputs (the inputs held in the div with
id=input_div) with different ids; - How to do with the first question done, to increment and de-increment (with the button plus and minus) the value of the current input with its id generated automatically (different from the others)... and how to remove it.
Thank you
