function cash_key(keys){ var c = +$('#cash_total').attr('value'); if (c == 0) {c = "";} $('#cash_total').val(c+keys); }