I have an update function and many input fields with a Quantity, I use the update function “onkeyup” for each input field/box. I want to get the value of the field that has been changed. How could I get the value of the field that was changed, key was up on.
Heres my code
Input boxes
<input type="text" class="shopcart_qty" size="2" onkeyup="update('1');" name="cart_1" value="1" >
<input type="text" class="shopcart_qty" size="2" onkeyup="update('2');" name="cart_2" value="5" >
Update Function
function update(){
//var qty = $(this).val();
// This above^^ doesn't work
alert(qty);
}