如何抑制“此页面正在访问不受其控制的信息" [英] How to suppress "This page is accessing information not under its control"

查看:18
本文介绍了如何抑制“此页面正在访问不受其控制的信息"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试从位于相同 URL(但不同目录)的 Jquery 访问 Web 服务时收到此消息.

I get this message when I am trying to access a web service from Jquery located in SAME the URL (but different directory).

我知道这是 IE 安全设​​置.问题是,我该如何抑制它...当然,人们不会将 Web 服务放在同一个网站、同一个目录中....

I know it is IE security setting. The question is, how do I suppress it...surely, people don't put web services in the same web site, same directory....

推荐答案

我知道这是因为跨域数据访问"造成的我已启用

I know this is caused because of 'Cross-domain data access' which I have enabled by

jQuery.support.cors = true;

在我的 Ajax 调用中,我必须指定 jsonp 作为我的数据类型来解决问题.

In my Ajax call I had to specify jsonp as my data type to fix the issue.

$.ajax({                    
           url: "xxx",                    
           dataType: "jsonp",
           ...
       });

这篇关于如何抑制“此页面正在访问不受其控制的信息"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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