久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      javascript如何自動關(guān)閉窗口

      方法:1、使用setTimeout()方法關(guān)閉,語法“setTimeout("clock();",1000);”;2、窗口沒有提示自動關(guān)閉,語法“this.window.opener=null; window.close();”。

      javascript如何自動關(guān)閉窗口

      本教程操作環(huán)境:windows7系統(tǒng)、javascript1.8.5版、Dell G3電腦。

      第一種:JS定時自動關(guān)閉窗口

      <script language="javascript"> <!-- function closewin() { self.opener=null; self.close(); } function clock() { i=i-1 document.title="本窗口將在" + i + "秒后自動關(guān)閉!"; if(i>0)setTimeout("clock();",1000); else closewin(); } var i=10 clock(); //--> </script>

      第二種:窗口沒有提示自動關(guān)閉的js代碼

      <script language=javascript>   <!--   this.window.opener = null;   window.close();   //-->   </script>

      擴(kuò)展資料:

      IE6-7 JS關(guān)閉窗口不提示的方法

      方法一:

      js 代碼

      function CloseWin() //這個不會提示是否關(guān)閉瀏覽器     {     window.opener=null;     //window.opener=top;     window.open("","_self");     window.close();     }

      方法二:

      open.html

      js 代碼

      function open_complex_self() {       var obj_window = window.open('close.html', '_self');       obj_window.opener = window;       obj_window.focus();      }

      close.html

      js 代碼

      window.close();

      另附:

      //普通帶提示關(guān)閉 function closeie(){ window.close(); } //關(guān)閉IE6不提示 function closeie6(){ window.opener=null; window.close(); } //關(guān)閉IE7不提示 function closeie7(){ window.open('','_top'); window.top.close(); }

      【推薦學(xué)習(xí):javascript高級教程】

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號