<html>
<body ><input type="button" onclick="opener.location.href='test1.html';window.close()" value="close">
</body>
</html>  
前面是test1.html
test.html
<html>
<body>
<input  type="button" onclick="window.open('test1.html','')" value="click">
</body>
 看清楚打开前和打开后的button名.

解决方案 »

  1.   

    test.html-->click-->test1.html-->close
    原test.html变成了test1.html(画面button,变为close)
      

  2.   

    "B"页面中写入如下:
    <script>
    window.onunload=uld;
    function uld(){
    window.opener.location=window.opener.location;
    }
    </script> 
      

  3.   

    <html>
    <body ><input type="button" onclick="opener.location.href='B.html';window.close()" value="关闭">
    </body>
    </html>  
    前面是B.html
    A.html
    <html>
    <body>
    <input  type="button" onclick="window.open('B.html','')" value="BUTTON">
    </body>
    这下好了把