jquery 跨域调用数据的BT问题
一开始,我这些程序都是ok的,然后换了个处理(url)的地址,域名变了,但是实际的服务器还是一样的。就提示jquery没有权限的问题。我已将IE设置中的 通过域访问数据 选项勾起来了。是否有其他方法调用远程的数据。$.getJSON?
$.ajax({
type:"POST",
// url:"http://sap.secpg.com/webdynpro/dispatcher/local/ScreenDisplay/ScreenDisplay",
url:"http://bi.shanghai-electric.com/webdynpro/dispatcher/local/ScreenDisplay/ScreenDisplay",
data:{j_user:$("#j_user").val(),j_password:$("#j_password").val()},
beforeSend:function(){$("#msg").html("处理中...");},
success:function(data){
if(data.indexOf("登录")>0)
{
$("#msg").html("");
$("#msg").html("用户验证错误!");
document.getElementById("j_user").value="";
document.getElementById("j_password").value="";
$("#j_user").focus();
}
else
{
$("#login").fadeOut(1000,function(){document.getElementById("j_user").value=""; document.getElementById("j_password").value="";$("#msg").html("");document.getElementById("login").style.display="none";$("#mainContent").load('login_content_new.htm',function(){$("#mainContent").hide().fadeIn(1000);})});
}
}
});