设上框架为topFrame,下框架为bottomFrame,下框架bottomFrame中又有iframe1和iframe2,问两个问题:
1.topFrame点超链时,在bottomFrame中的iframe2中打开相应页面的代码如何写?
2.iframe1中点超链时,在同页的iframe2中打开相应页面的代码如何写?
1.topFrame点超链时,在bottomFrame中的iframe2中打开相应页面的代码如何写?
2.iframe1中点超链时,在同页的iframe2中打开相应页面的代码如何写?
var bottomwin=parent.frames["bottomFrame"];
bottomwin.frames["iframe2"].location.href=.....;
2.
对iframe1
<base target =iframe2>
function openLink(url)
{
var bottomwin=parent.frames["bottomFrame"];
bottomwin.frames['rightFrame'].location.href=url;
}
</script><a href="javascript:openLink('Register.aspx?id=R')">注册</a>