怎么让alert()对话框10秒钟后自动关闭!!

解决方案 »

  1.   

    我的意见:用框架实现,将alert()写到隐藏的子框架中,并定时刷新子框架,当然了alert()要事件来触发。
      

  2.   

    alert好像是不行,你可以改成页面然后写上下面的东西function ReAutoLoad(){
    window.close();
    }setTimeout(ReAutoLoad,5000);
      

  3.   

    你可以用做个页面,页面就和alert一样子,然后来控制这个页面
      

  4.   

    alert好像是不行,只能模拟一个。试试这个
    <html>
    <head>
    <title>Test </title> 
    <script>
    function test() {
    if0.showModelessDialog("javascript:alert();window.close();","","status:no;resizable:no;help:no;dialogHeight:30px;dialogWidth:40px;");   
      setTimeout("if0.location.reload();",10000);   
    }</script>
    </head> 
    <body> 
    <iframe   style="display:none"   name=if0   ></iframe> 
    <input type="button" value="测试" onclick="test();">
    </body> 
    </html> 
      

  5.   

    用别的代替alert的对话框,那个是自动关闭不了的。
      

  6.   

    同上 10秒中自动关闭的就不是ALERT了... 你可以套个HTML页面
      

  7.   

    弹出alert框,一秒后自动关闭<br>   
        
      <script   language="JavaScript">   
      var   aaa   
      function   test()   
      {   
      aaa=if0.showModelessDialog("javascript:alert();window.close();","","status:no;resizable:no;help:no;dialogHeight:30px;dialogWidth:40px;");   
      setTimeout("if0.location.reload();",1000);   
        
      }   
      </script>   
      <iframe   style="display:none"   name=if0   ></iframe>   
      <input   type="button"     value="弹出alert框,一秒后自动关闭;"   onClick="JavaScript:test()">   
      </form>