权限被拒绝 IE iFrame [英] Permission Denied 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 -
http://www.tomhoppe.com/index.php/2008/03/cross-sub-domain-javascript-ajax-iframe-etc/
像这样设置 document.domain:
Set document.domain like this:
<script type="text/javascript">
document.domain = 'tomhoppe.com';
</script>
这篇关于权限被拒绝 IE iFrame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!