You have a simpler approach that implements the increase and decrease buttons. A quick example using inline javascript:
<input type='button' name='add' onclick='javascript: document.getElementById("qty").value++;' value='+'/> <input name='qty' id='qty' style="text-align:center;" type="text" value="1" autocomplete="off" size="2"> <input type='button' name='subtract' onclick='javascript: document.getElementById("qty").value--;' value='-'/>
source share