网站发布后,AJAX问题,求大神
$.ajax({
type:"POST",
url:"./BBSService.asmx/Login",
data:"{'userID':'"+userID+"','password':'"+password+"','verifyCode':'"+verifyCode+"'}",
contentType:"application/json",
dataType:"json",
success: function(data)
{
alert(data);
data = eval("("+data+")");
if(data == "1")
{
window.location.href="Default.aspx";
}
if(data == "2")
{
$("#lblMsg").text('帐号或密码错误,请重新输入。');
changeCode();
}
if(data == "0")
{
$("#lblMsg").text('验证码错误,请重新输入。');
changeCode();
}
},
error: function(msg)
{
$("#lblMsg").text('ajax请求失败。');
//alert(msg.responseText)
}
});
主要代码如上,功能是登录。
问题:vs上跑的很正常,某些机器上发布后跑的也正常,alert(data)弹出的也是我需要的值,但是在某些机器上发布后,alert(data)弹出的值为object,在该出问题机器上用vs跑源码也是正常的结果,这是为何?
希望有的朋友遇到过,帮我解决下,感谢.
只能给100分,无语了。