JS中AJAX用于校验

$.ajax({
    type: "POST",
    url: "/demand/checkOrder.do",
    data: dataCheck,
    datatype: "json",
    success: function (dataCheck) {
        dataCheck = $.parseJSON(dataCheck);
        if (dataCheck.result === true) {
            window.location.href = cartUrl + "/cart/inquiryQuickOrder.do?" + data;
        } else {
            $("#messageModalSpan").html(dataCheck.message);
            $("#messageModal").modal();
            return;
        }
    }
});

猜你喜欢

转载自blog.csdn.net/baidu_38794249/article/details/89452228
今日推荐