dojo中的xhrPost请求(JSON)

来源:互联网 发布:mina 数据接收不全 编辑:程序博客网 时间:2024/04/28 14:30

dojo中的xhrPost请求


dojo.xhrPost({

       url:"../area.action",

       content:{

             areaCode:areaCode

       },

       handleAs:'json',

       handle:function(resp){

              console.info(resp.items);

              //返回成功处理

      }

});


说明:(1)url:请求路径,可以是action或者json

          (2)content:传参数,前者是Java传参数,后者是页面参数

          (3)handleAs:请求方式

          (4)handle:成功返回结果后处理情况

2 0
原创粉丝点击