亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Window ??? ?? ???? ???

open() ???

  • ??: ? ???? ?? ???.

  • ??: ??var winObj = window.open([url][,name][,options]);

  • ??: ????? ?? ?????. ????? ???? ??? ? ?? ????(??? ????).

  • ????:

    • url: ? ?? ??? ??? ? ?????. url? ? ???? ???? ???? ? ???? ? ????.

    • name: ? ?? ?????. ? ??? ??? ?? ??? ?????.

    • options: ?? ?????.???????????????????????????????????????????????????????????????????????????????????????????????????????????~ >

    • ??: ?? ??? ?? ??.是否 ??: ?? ???? ???? ?????.
    B ????: ???? ?? ??? S ??? ??? ? ????. +??????????????????????????????? 4. ?? ?: ? ??? ??? ???? ? ???? ?? ??? ? ????. winObj?? window ??? ?? ??? ???? ????.

    ??:


    onload ???: ? ???(??)? ? ???? ???? ??? ?? ???? ??? ?? ??????. JS ??? ????? onload ??? ??? ?????. onload ??? body ????? ??? ? ????.

    onclick ???: ?? ? JS ??? ?????. ?? HTML ???? ? ??? ??? ????.

    <!DOCTYPE HTML>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
            <title>php.cn</title>
            <script type="text/javascript">
            function init(){
            window.open("","php.cn") 
            }
            </script>
        </head>
        <body onload="init()">
        </body>
    </html>


    Delayer ??? - setTimeout()


    setTimeout()

    ??: ?? ??? ?????. ?, ??? ? ?? ?? ?????. ? JS ??? ? ?.
    • ??: ??var ??? = window.setTimeout(code,millisec)
    • ????:
    • ??: ?? ???? JS ??, ????? JS ?????. ??? ???? ??? ???. O ?: Window.Settimeout ("Close ()", 2000) ?: Window.Settimeout (Init, 2000); // ?? ??? ????? ???? ??? ??? ????. ??? ???? ??? ?? ??? ???? ?????.
    ????????????????????????? ???: ??? ?. 1? = 1000???

    ???: ???? id ??? ?????. ? id ???clearTimeout()? ?????.

      clearTimeout()
    ??: ??? ID ?? ???

    ??: ??window.clearTimeout(timer)
    • ????: ???? setTimeout() id ??? ??? ??????.
    • <!DOCTYPE HTML>
      <html>
          <head>
              <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
              <title>php.cn</title>
              <script type="text/javascript">
              function init(){
              //打開一個(gè)新窗口
              var win=window.open();
              win.document.write("歡迎來到php.cn") ;
              //新窗口2秒后關(guān)閉
              win.setTimeout("window.close()",2000);
              }
              </script>
          </head>
          <body onload="init()">
          </body>
      </html>

    Timer method


    setInterval()

    ??: ???? ?????. ???, JS ??? ?????(?????) ?????.

    ??: var ??? = window.setInterval(code, millisec)
    • ????:

    ??: ???? JS ???? ????? JS ?????. ??? ???? ??? ???. + ? ??? ???? ??? ?? ??? ???? ?????.

    ????????????????????????? ???: ??? ?. 1? = 1000???

    ???: ???? id ??? ?????. ? id ???clearInterval()? ?????.

    • clearInterval()

    ??: ??? ID ?? ???

    • ??: ??window.clearInterval(timer)

    • ????: ???? setInterval()? ?? ??? ???? ID???. ??? ??.

???? ??
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> <script type="text/javascript"> function init(){ window.open("","php.cn") } </script> </head> <body onload="init()"> </body> </html>