NutzCN Logo
问答 我用以前的ajax 查数据为什么接受不到???
发布于 2225天前 作者 qq_bd0f335e 2623 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

js 接受data是 data is not defined 为什么

  function conn() {
        $.ajax({
            url:'${base}/platform/iff/user/typeyonghu',
            type:'post',
            data:{'typeuser':typeuser},
            success: function(data){
                user=data;
            }
        });
    }

后台

 @At("/typeyonghu")
    @Ok("json:full")
    @RequiresPermissions("platform.iff.user")
    public Object typeyonghu(int typeuser) {
        Iff_usertype iffUsertype=iffUsertypeService.fetch(Cnd.where("type","=",typeuser));
        String usertype=iffUsertype.getUsertype();
        return usertype ;
    }
5 回复
           success: function(re){
                user=re;
            }

不行啊,还是没有,

message: "re is not defined"
stack: "ReferenceError: re is not defined↵    at eval (eval at conn (http://localhost:8080/platform/iff/user:336:5), <anonymous>:1:1)↵    at conn (http://localhost:8080/platform/iff/user:917:5)↵    at render (http://localhost:8080/platform/iff/user:670:25)↵    at http://localhost:8080/assets/plugins/datatables/jquery.dataTables.js:150:45↵    at Object.oCol.fnGetData (http://localhost:8080/assets/plugins/datatables/jquery.dataTables.js:67:441)↵    at _fnGetCellData (http://localhost:8080/assets/plugins/datatables/jquery.dataTables.js:133:160)↵    at _fnCreateTr (http://localhost:8080/assets/plugins/datatables/jquery.dataTables.js:224:16)↵    at _fnAddData (http://localhost:8080/assets/plugins/datatables/jquery.dataTables.js:123:2)↵    at _fnAjaxUpdateDraw (http://localhost:8080/assets/plugins/datatables/jquery.dataTables.js:394:208)↵    at http://localhost:8080/assets/plugins/datatables/jquery.dataTables.js:381:146"

datatable? 不是单纯的jquery ajax?

是单纯的ajax,但是 我不知道为什么把上面的扯上了

chrome上debug一下js代码吧

添加回复
请先登陆
回到顶部