想实现的功能描述:
首先打开a.html,点击文字 "Open Window" 时,弹出窗口b.html
在b.html窗口中点击文字 "Change fatheriframe" 时,改变a.html中iframe的href值
a.html -------------------------------------------<script type="text/javascript">
window.name="fatherwindow"
</script>
<a onclick="aaa=window.open("b.html")">Open Window</a>
<iframe name="fatheriframe"></iframe>b.html -------------------------------------------<script type="text/javascript">
function changfatheriframe()
{
fatherwindow.document.frames['fatheriframe'].location.href='c.html';
}
</script>
<a onclick="changfatheriframe();">Change fatheriframe</a>
首先打开a.html,点击文字 "Open Window" 时,弹出窗口b.html
在b.html窗口中点击文字 "Change fatheriframe" 时,改变a.html中iframe的href值
a.html -------------------------------------------<script type="text/javascript">
window.name="fatherwindow"
</script>
<a onclick="aaa=window.open("b.html")">Open Window</a>
<iframe name="fatheriframe"></iframe>b.html -------------------------------------------<script type="text/javascript">
function changfatheriframe()
{
fatherwindow.document.frames['fatheriframe'].location.href='c.html';
}
</script>
<a onclick="changfatheriframe();">Change fatheriframe</a>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货