自由飞翔

我在仰望,java之上

统计

留言簿(2)

我关注的blog

阅读排行榜

评论排行榜

iframe页面调用父页面的js函数 (转载)


假若iframe所在的页面here.html有个JS函数为:wode(),它位于页面的<script></script>这个节

然后iframe的src,即里面的页面为:other.html,那么我们在other.html里面就可以如下调用here.html里面的wode这个函数:window.parent.wode();


对于父页面的控件的引用就如法炮制:window.parent.document.getElementById('xxxx')
来自: http://hi.baidu.com/%D3%DA%EA%BB%CC%ED/blog/item/a8384000e1ddec0f1c9583e6.html

Gavin

posted on 2011-11-24 12:03 GavinMiao 阅读(803) 评论(0)  编辑  收藏 所属分类: javascript


只有注册用户登录后才能发表评论。


网站导航: