参考父窗口文档 [英] Reference parent window document

查看:97
本文介绍了参考父窗口文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从弹出式窗口访问父窗口文档。

I'm trying to access the parent window document from a popup.

<script type='text/javascript'>
    $(document).ready(function(){
        var summary = window.parent.document.getElementById('summary');
        var content = summary.innerHTML;
    });
</script>

甚至有可能吗?有没有一个jQuery具体的方法来做?

Is it even possible? Is there a jQuery specific way to do it?

谢谢

推荐答案

你想要 window.opener 不是 window.parent (用于框架)。

You want window.opener not window.parent (that's for frames).

这篇关于参考父窗口文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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