dojo中的xhrPost请求(JSON)

时间:2014-02-13 07:40:36   收藏:0   阅读:637

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:成功返回结果后处理情况

原文:http://blog.csdn.net/you23hai45/article/details/19131517

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!