87,904
社区成员
发帖
与我相关
我的任务
分享
<body onload=focus()>
a.htm<br/>
<a href=b.htm target=_b onclick="return chkopener()">b.htm</a>
</body>
<script>
function chkopener(){
try{
if (!window.opener.closed) {
window.opener.location.reload();
return false;
}
} catch (e1) { }
return true;
}
</script>
<body onload=focus()>
b.htm<br/>
<a href=a.htm target=_a onclick="return chkopener()">a.htm</a>
</body>
<script>
function chkopener(){
try{
if (!window.opener.closed) {
window.opener.location.reload();
return false;
}
} catch (e1) { }
return true;
}
</script>
<a href="#" id="winA">b.html</a>
<script language="javascript">
var winA=document.getElementById("winA");
winA.onclick=function(){
if(window.opener){
if(opener.closed==true)
child_win=window.open("b.html","_blank","");
else
opener.location.reload();
return false;
}
if(child_win){
if(child_win.closed==true)
child_win=window.open("b.html","_blank","");
return false;
}
var child_win=window.open("b.html","_blank","");
return false;
}
</script>
<a href="#" id="winB">a.html</a>
<script language="javascript">
var winB=document.getElementById("winB");
winB.onclick=function(){
if(window.opener){
if(opener.closed==true)
child_win=window.open("a.html","_blank","");
else
opener.location.reload();
return false;
}
if(child_win){
if(child_win.closed==true)
child_win=window.open("a.html","_blank","");
return false;
}
var child_win=window.open("a.html","_blank","");
return false;
}
</script>