jquery 在 iframe 中选择页面的某些内容
我有一个这样的页面:
=========================================
| PARENT! |
| |
| |
| =============== |
| | iframe | |
| =============== |
| |
| |
| |
| |
| |
| |
|========================================
是否有任何 jQuery 可以在父窗口中选择某些内容?
这些页面位于不同的域中。
I got a page like this:
=========================================
| PARENT! |
| |
| |
| =============== |
| | iframe | |
| =============== |
| |
| |
| |
| |
| |
| |
|========================================
is there any jQuery possible to select something in the parent window?
The pages are in different domains.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,只要 iframe 与父级位于同一域中,以下操作即可:
更新: 明确这需要相同的域
Yes, as long as the iframe is in the same domain as the parent the following works:
Updated: to make clear the fact that this requires same domain