js get 方法拒绝访问
时间:2011-12-07
来源:互联网
我有这样一段JS代码,在火狐下面运行正常没事,但是在IE下就报JS错误,说拒绝访问,也就是$get()方法过不去,请问这是什么原因,该如何解决?
if (rlt == '1') {
var userName = document.getElementById("TB_Account").value;
if (userName == "" || userName == null) {
return;
} else {
$.get("http://192.168.0.188:120/shortcut/reg.aspx?par=" + userName + "&ab=" + Math.random(), function (result) {
alert("返回值:" + result);
//如果已注册
if (result == 1) {
notice.className = "log_fx";
// aWritenResult = "0";
return false;
}
//如果未注册
else if (result == 0) {
notice.className = "log_fh";
// aWritenResult = "1";
return true;
}
else {
notice.className = "log_fx";
// aWritenResult = "0";
return false;
}
});
}
}
if (rlt == '1') {
var userName = document.getElementById("TB_Account").value;
if (userName == "" || userName == null) {
return;
} else {
$.get("http://192.168.0.188:120/shortcut/reg.aspx?par=" + userName + "&ab=" + Math.random(), function (result) {
alert("返回值:" + result);
//如果已注册
if (result == 1) {
notice.className = "log_fx";
// aWritenResult = "0";
return false;
}
//如果未注册
else if (result == 0) {
notice.className = "log_fh";
// aWritenResult = "1";
return true;
}
else {
notice.className = "log_fx";
// aWritenResult = "0";
return false;
}
});
}
}
作者: benben_tong 发布时间: 2011-12-07
是不是浏览器兼容问题啊 你可以判断一下浏览器
作者: hefeng_aspnet 发布时间: 2011-12-08
跨域了把
作者: Sandy945 发布时间: 2011-12-09
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28