本文介绍了使用window.name跨域访问iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我实现了一个脚本,监视iframe名称,因为我知道是从网络上的各种来源。但是,它似乎我必须得到一些错误 - 我得到
I implemented a script that monitors the iframe name as I understood was OK from various sources on the net. However it seems I must have gotten something wrong - I get
错误:权限被拒绝访问属性'名称'
源文件:
行:16
请访问
我宁愿只是修复我的脚本,不使用jQuery或DOJO或其他框架。感谢
I would prefer just to fix my script and not use jQuery or DOJO or some other framework. Thanks
推荐答案
这里是您需要的跨网域通讯还是只是窗口名称?
Is it cross-domain communication you need here, or just the name of the window?
如果是第一个,请查看 - 它抽象出所有的麻烦XDM浏览器范围从IE6到Chrome10。
If the first one, take a look at easyXDM - it abstracts away all the hassle with XDM across browsers ranging from IE6 to Chrome10.
这篇关于使用window.name跨域访问iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!