Jasonding
Jasonding
  • 发布:2015-12-12 14:51
  • 更新:2015-12-12 15:43
  • 阅读:2666

mui.ajax() 用什么方法打印服务端相应的数据

分类:MUI

mui.ajax('http://...', {
data: {
username: username.value,
password: password.value
},
dataType: 'json',
type: 'post',
timeout: 5000,
success: function(res) {
//处理成功返回数据

                },  
                error:function(xhr,type,errorThrown){  
                    //异常处理;  
                    console.log(type);  
                }  

            });  

比如这边用什么方法打印res,console.log();只能看到[object, object]这样的数据,无法看到具体的数据,还有客户端调试的时候怎样查看post的数据及请求的http地址

2015-12-12 14:51 负责人:无 分享
已邀请:
maq

maq

console.log(JSON.stringify(res, undefined, '\t'));

该问题目前已经被锁定, 无法添加新回复