Here is my Select Option:-
<select id="listboxstock" size="5" class="form-control">
<option>Carrot - 3</option>
<option>Cucumber - 2</option>
</select>
I want to append the quantity of the item, if the same item added. For the example:
If I add 1 more carrot, the option should be change from:-
<option>Carrot - 3</option> to be <option>Carrot - 4</option>
Can I use javascript for this? if not, how I can do it?