JS中window.parent.document.getElementById("mainFrame")这句是什么意思

日期:2021-07-17 01:53:54 人气:1

JS中window.parent.document.getElementById("mainFrame")这句是什么意思

比如说:
你的Js所在的页面叫child.htm
那么还存在另一个页面,我就叫他parent.htm吧.
那么在parent.htm里面的代码是这样的:
<iframe id="mainFrame" src="xxx.htm" />
<iframe id="childFrame" src="child.htm"/>
总的来说是
    A+
热门评论