曾经有人问过
 好似如果点的不是 button A 之类的标签就会提示.
  

解决方案 »

  1.   

    可以用js模拟。。测试了下,不支持FIREFOX.等待高人。<html>
    <head><title>关闭窗口</title></head>
    <body>
    </body>
    <form>
    <input type="button" value="关闭窗口" onclick="closeWindow()" />
    </form>
    <script type="text/javascript">
    function closeWindow()
    {
       window.open('','_parent','');
      window.close(); 
    }   
    </script>
    </html>
      

  2.   

    没人回答 吗
    google和firefox的关闭代码是什么?
      

  3.   

    呵呵,这个代码不是分IE还是FF
    无提示关闭
    必须是脚本弹出的窗口才可以
      

  4.   

    a.html
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    <script>
    window.open('b.html')
    </script>
    </head><body>
    </body>
    </html>
    b.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    <script type="text/javascript">
    function closeWindow()
    {
       window.open('','_parent','');
      window.close(); 
    }   
    </script>
    </head><body>
    <form>
    <input type="button" value="关闭窗口" onclick="closeWindow()" />
    </form>
    </body>
    </html>如果你单独运行b.html,那么你按关闭还是有提示
    但如果是由a.html弹出的来的b.html那么按关闭就没有提示不信的自己测试
      

  5.   

    你按我说的试试就知道,不管在IE还是FF
    只要是由a.html弹出的来的b.html那么按关闭就没有提示