在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ ajax請(qǐng)求成功,但是訪問不到部分?jǐn)?shù)據(jù)

ajax請(qǐng)求成功,但是訪問不到部分?jǐn)?shù)據(jù)

ajax請(qǐng)求后臺(tái)數(shù)據(jù),console了msg之后,出現(xiàn)的數(shù)據(jù),顯示是有maxPage的,但是代碼中,會(huì)報(bào)錯(cuò)maxPage為空,這是什么問題?
下面是我的代碼

$.ajax({
        url : "../../yqParameter/queryForList",
        // url : "../../json/test_smokeQuality_paramsync.json",// 模擬json
        data : {
            limit : rowNum,// 行數(shù)
            thisPage : pageNo,// 當(dāng)前頁(yè)
            runningStatus : runstateo,// 運(yùn)行狀態(tài)
            msgStatus : msgstateo,// 通訊狀態(tài)
            lackStatus : qualitystateo,
            dtuImei : dtustateo,// DTU的值
            dvArea : valArea,// 區(qū)域
            dvName : mouSearch
        // 名稱
        },
        type : 'post',
        dataType : 'jsonp',
        // dataType : 'json',
        beforeSend : function() {
            $(window.parent.document).find("#loadings").show();
        },
        success : function(msg) {
            $(window.parent.document).find("#loadings").hide();
            $('#tabid tbody').empty();
            // console.log(msg);
            console.log(msg.data.maxPage);
            totalPage = msg.data.maxPage;
            totalRecord = msg.data.total;
            
            // console.log(totalRecord);
            kkpager.total = totalPage;
            kkpager.totalRecords = totalRecord;
            initpage(pageNo, totalRecord, totalPage);
            // table數(shù)據(jù)展示
            successmsg(msg);
            $(".loadings").hide();
        },
        error : function(jqXHR, textStatus, errorThrown) {
            autoLogin(jqXHR);
        }

    });

圖片描述

回答
編輯回答
不討囍

read property 'maxPage' of null的意思是xxx.maxPagexxxnull

2018年3月11日 19:06
編輯回答
終相守

你看看你報(bào)錯(cuò)位置,對(duì)maxPage的使用是否正確。

2018年4月11日 20:55