jeudi 30 juin 2016

Delete text in input field not working


I have a plus/minus button where you can plug in only numerical values in the input field or click the plus/minus button to select a value. When you go click inside the text field and try to delete or backspace the number it is not working. Here is the html and a link to my fiddle. Update: The delete key works in Chrome but not in Firefox. https://jsfiddle.net/714dxayk/5/

<span class="form-title">Quantity</span>
<form id='myform' method='POST' action='#' class="numbo">
<input type='button' value='-' class='qtyminus' field='quantity' style="font-weight: bold; font-size:18px;" />
<input type='text' name='quantity' value='1' class='qty' style="margin-bottom: 0px !important" onkeypress='return event.charCode >= 48 && event.charCode <= 57'/>
<input type='button' value='+' class='qtyplus' field='quantity' style="font-weight: bold; font-size:18px;" />
</form>

Aucun commentaire:

Enregistrer un commentaire