以下方法可以實現你的要求,唯一缺限就是必需屏閉掉了刷新功能
//hjh01.htm:
   <script>
   window.open("hjh02.htm","","toolbar=no")
   </script>
   <body>
   This is the first page
   </body>
//hjh02.htm:
   <script>
var flatIndex=1
function clo()
{
  if(flatIndex)
  window.opener.close() 
}function sub()
{
 flatIndex=0
 hjh.submit()
}
</script>
<body onkeydown="javascript:if(event.keyCode==116);event.keyCode=0;event.returnValue=false;"  oncontextmenu="javascript:self.event.returnValue=false;" onbeforeunload="clo()">
<form name="hjh" action="hjh03.htm" method="post" onsubmit="sub()">
<input type=button id="b1" value="close self" onclick="self.close()">
<input type=submit id="s1" value="submit self" >
This is page02:  hjh02
</form>
</body>
//hjh03.htm:
   <script>
var flatIndex=1
function clo()
{
  if(flatIndex)
  window.opener.close() 
}function sub()
{
 flatIndex=0
 hjh.submit()
}
</script>
<body onkeydown="javascript:if(event.keyCode==116);event.keyCode=0;event.returnValue=false;"  oncontextmenu="javascript:self.event.returnValue=false;" onbeforeunload="clo()">
<form name="hjh" action="hjh02.htm" method="post" onsubmit="sub()">
<input type=button id="b1" value="close self" onclick="self.close()">
<input type=submit id="s1" value="submit self" >
This is page03:  hjh03
</form>
</body>

解决方案 »

  1.   

    To : hjhing(winding) 
    谢谢你的回复,但是你的办法似乎不能满足如题所述的要求。因为我是在同一个B/S架构的系统中,
    所以我只要求。if 关闭浏览器窗口
      对父窗口进行扫尾工作(eg.:opener.parent.close();)
    else 
      do nothing不能“屏閉掉了刷新功能”。
      

  2.   

    <body onunload="window.open('一个页面通知Server换了地址或关闭窗口.asp')">
      

  3.   

    aff=window.open("http://act1.campus.sohu.com/");
    if (!aff.closed) aff.close();
    其他的功能类似写法。