如何摆脱IE弹出警告 [英] How to get rid of IE popup warning

查看:97
本文介绍了如何摆脱IE弹出警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我打开一个aspx页面的JS代码(包含url变量:myURL)时:

 $。ajax({
type:' 获取'
url:myURL,
dataType:' json'
callbackParamName:' callback'
crossDomain: true
成功: function (响应){
调试器;
drawResponseGeometries(响应);
},
错误: function (xhr,status,error){
debugger ;
console .log(error);
}
});



IE会弹出一条警告信息:

此页面正在访问的信息是不受其控制。这带来了安全风险。你想继续吗?



我想摆脱这个警告。请告诉我怎么做。在此先感谢。

解决方案

.ajax({
type:' 获取'
url:myURL,
dataType:' json'
callbackParamName:' callback'
crossDomain: true
成功:功能(响应){
debugger ;
drawResponseGeometries(response);
},
错误: function (xhr,status,error){
debugger ;
console .log(错误);
}
});



IE会弹出一条警告信息:

此页面正在访问的信息是不受其控制。这带来了安全风险。你想继续吗?



我想摆脱这个警告。请告诉我怎么做。在此先感谢。


参考



1. 进行跨域jQuery AJAX调用 [ ^ ]

2. 针对IE,Firefox,Chrome,Safari的jSON响应的跨域Ajax请求 - jQuery [ ^ ]



这些可能会对你有所帮助。 :)

When I open an aspx page's JS code (that contains url variable: myURL):

$.ajax( {
      type:'Get',
      url: myURL,
      dataType: 'json',
      callbackParamName: 'callback',
      crossDomain : true,
      success:function(response) {
        debugger;
        drawResponseGeometries(response);
      },
      error: function(xhr, status, error) {
        debugger;
        console.log(error);
      }
    });


the IE pops up a warning message:

This page is accessing information that is not under its control.  This poses a security risk.  Do you want to continue?


I want to gent rid of this warning. Please advise me how to do it. Thanks in advance.

解决方案

.ajax( { type:'Get', url: myURL, dataType: 'json', callbackParamName: 'callback', crossDomain : true, success:function(response) { debugger; drawResponseGeometries(response); }, error: function(xhr, status, error) { debugger; console.log(error); } });


the IE pops up a warning message:

This page is accessing information that is not under its control.  This poses a security risk.  Do you want to continue?


I want to gent rid of this warning. Please advise me how to do it. Thanks in advance.


Refer

1. Making Cross Domain jQuery AJAX Calls[^]
2. Cross Domain Ajax Request with JSON response for IE,Firefox,Chrome, Safari – jQuery[^]

These might help you. :)


这篇关于如何摆脱IE弹出警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆