调试“不安全的javascript尝试使用URL访问框架...” [英] Debugging "unsafe javascript attempt to access frame with URL ... "

查看:233
本文介绍了调试“不安全的javascript尝试使用URL访问框架...”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,错误消息是从(i)帧内从不同域访问父帧或窗口的安全限制。

So, the error message is the security restriction to access a parent frame or window from within an (i)frame from a different domain.

(不安全的javascript尝试从URL为yyy的框架访问带有URL xxx的框架。域,协议和端口必须匹配)。

(Unsafe javascript attempt to access frame with URL xxx from frame with URL yyy. Domains, protocols, and ports must match).

但是,webkit或chrome中没有显示任何行生成此错误。

However, there is no line shown in webkit or chrome from where this error is generated.

那么如何获得侵犯此行的行列表?我知道我可以搜索,但这也适用于cookie(document.cookie等)?是否有不允许的事项清单?

So how do I get a list of the lines that infringe upon this? I know I can just search, but does this apply to cookies as well (document.cookie, etc) ? Is there a list of things that are disallowed?

编辑:另外,我需要使用什么代替$(window.top)?

谢谢。

推荐答案

如果您拥有所有页面(包含文档和iframe文档)在每个人中添加一些javascript以允许他们愉快地沟通:

If you own all of the pages (the containing document and the iframe document) just stick some javascript in each of them to allow them to communicate happily:

document.domain = 'myDomain.com';

这篇关于调试“不安全的javascript尝试使用URL访问框架...”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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