iframe中从子到父的跨域访问 [英] cross domain access in iframe from child to parent

查看:67
本文介绍了iframe中从子到父的跨域访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当载入iframe的网页来自其他网域时,如何从载入iframe的文件中存取父文件?

how do we access parent document from a document loaded inside an iframe when the page loaded inside iframe is from another domain ?

我收到权限被拒绝错误。

I am getting a permission denied error.

感谢您提供帮助。

推荐答案

控制两个文档,那么您可以轻松地使用easyXDM( http://easyxdm.net )在它们之间进行通信。
使用它的一个非常简单的例子可以在 http:// consumer.easyxdm.net/current/example/methods.html

if you have control of both documents, then you could easily use easyXDM (http://easyxdm.net) to communicate between them. A nice and easy example of using it can be found at http://consumer.easyxdm.net/current/example/methods.html

这篇关于iframe中从子到父的跨域访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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