本文介绍了权限被拒绝IE iFrame的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在A.com上有一个网站,在B.com上有一个iframe,它从A.com调用javascript。这在FF中很有用。在IE7 / 8中我得到了一个
I have a site on A.com and an iframe on B.com which calls javascript from A.com. This works great in FF. In IE7 / 8 I am getting a
Message: Access is denied.
消息。我已经通过Fiddler检查了HTTP流量 - 我可以看到它在Fiddler中没有被阻止?
message. I have checked the HTTP Traffic via Fiddler - and I can see that it isn't blocked in Fiddler ?
任何想法可能导致这种情况以及如何解决?
Any ideas what could be causing this and how to solve?
推荐答案
如果两个页面都在你的控制范围内(即它们属于你并且你改变了代码),试试这个 -
If both the pages are under your control (i.e. they belong to you and you cn alter the code), try this -
像这样设置document.domain:
Set document.domain like this:
<script type="text/javascript">
document.domain = 'tomhoppe.com';
</script>
这篇关于权限被拒绝IE iFrame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!