此功能之前完美无缺,现在没有,有人可以告诉我原因吗?
function addSelectedItem() {
var saleItem = document.getElementById('selecteditem').value;
var saleQty = parseInt(document.getElementById('qty').value);
if (!saleQty || saleQty === 0) {
alert('Please enter a quantity!');
return;
}
$.post('../process/sale_addtobasket.php', {itemno: saleItem, itemqty: saleQty}, function(data) {
if (data === 'SUCCESS') {
$('#boxselecteditem').hide();
$('#qty').val('');
reloadReceipt();
}
});
}
" ../过程/ sale_addtobasket.php"响应SUCCESS但功能不触发?