0

嗨,我有 ajax 函数,它将向 PHP 文件发送请求,我想过滤 PHP 文件返回的结果,如果请求给出空结果,我想显示一个警报 boz。这是我的代码:

function check_invoice(){
        var invno    = this.val();
        var $row     = $(this).closest("tr");
        var vendor   = $row.find('.sub_vendor').val();
        var product  = $row.find('.product').val();
        $.get("../model/check_product_with_invoice_number.php", { invno : invno, product : product, vendor : vendor}, function(result){ 
    if(result == ""){
    alert("Value does Not exist");
}
        });

}
4

0 回答 0