ajax 应用

复制代码
        function UpdateSubjectProductNum() {
            var arraySubjectNo = '';
            $("input[name='SubjectNoCheckBox']").each(function () {
                arraySubjectNo = arraySubjectNo + "," + $(this).val();
            });
            if (arraySubjectNo != "") {
                $.ajax({
                    url: "/Outlet/SubjectConsole/UpdateSubjectProductNum",
                    type: "post",
                    dataType: "json",
                    data: "subjectNo=" + arraySubjectNo + "&type=1&t=" + new Date().getTime(),
                    success: function (data) {
                        if (data != null) {
                            for (var i = 0; i < data.jsonProduct.length; i++) {
                                $("#productNum_" + data.jsonProduct[i].SubjectNo).html(data.jsonProduct[i].ProductNum);
                            }
                        }
                    },
                    error: function (x, e) {
                        alert(x.responseText);
                    }
                });
            }

        }
复制代码

 

posted on   【波少】  阅读(124)  评论(0编辑  收藏  举报

努力加载评论中...

导航

< 2025年4月 >
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3
4 5 6 7 8 9 10

统计

点击右上角即可分享
微信分享提示