jquery $ajax调后台方法,响应出正确的json数据,但会弹出object object
$.ajax({type:"POST",url:"login.aspx/SignInOK",data:"{'name':'"+name+"','pwd':'"+pwd+"...
$.ajax(
{
type: "POST",
url: "login.aspx/SignInOK",
data: "{'name':'" + name + "','pwd':'" + pwd + "'}",
contentType: "application/json;charset=utf-8",
dataType: "json",
success: function (data) {
var result = data.d;
if (result) {
return true;
}
else {
return false;
}
},
error: function (err) {
alert(err);
}
}); 展开
{
type: "POST",
url: "login.aspx/SignInOK",
data: "{'name':'" + name + "','pwd':'" + pwd + "'}",
contentType: "application/json;charset=utf-8",
dataType: "json",
success: function (data) {
var result = data.d;
if (result) {
return true;
}
else {
return false;
}
},
error: function (err) {
alert(err);
}
}); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询