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

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

问题描述

当我尝试从位于SAME中的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天全站免登陆