乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      常用的 Javascript 操作匯總 (七

       WindySky 2009-06-24
      61 是否可以縮放新窗口的大小

      1: <script language=”JavaScript”>
      2: window.open('http://www.liu21st.com/' , 'myNewWindow', 'resizable=yes' );</script>


      62 加載一個新的文檔到當前窗口

      1: <a href='#' onClick='document.location = '125a.html';' >Open New Document</a>


      63 設置頁面的滾動位置

      1: <script language=”JavaScript”>
      2: if (document.all) { //如果是IE瀏覽器則使用scrollTop屬性
      3: document.body.scrollTop = 200;
      4: }
      else { //如果是NetScape瀏覽器則使用pageYOffset屬性
      5: window.pageYOffset = 200;
      6: }
      </script>


      64 在IE中打開全屏窗口

      1: <a href='#' onClick=”window.open('http://www.juxta.com/','newWindow','fullScreen=yes');”>Open a full-screen window</a>


      65 新窗口和父窗口的操作

      1: <script language=”JavaScript”>
      2: //定義新窗口
      3: var newWindow = window.open(“128a.html”,”newWindow”);
      4: newWindow.close(); //在父窗口中關閉打開的新窗口
      5: </script>
      6: 在新窗口中關閉父窗口
      7: window.opener.close()


      66 往新窗口中寫內(nèi)容

      1: <script language=”JavaScript”>
      2: var newWindow = window.open(“”,”newWindow”);
      3: newWindow.document.open();
      4: newWindow.document.write(“This is a new window”);
      5: newWIndow.document.close();
      6: </script>


      67 加載頁面到框架頁面

      1: <frameset cols=50%,*>
      2: <frame name=”frame1” src="/”135a.html">
      3: <frame name=”frame2” src="/”about:blank">
      4: </frameset>
      5: 在frame1中加載frame2中的頁面
      6: parent.frame2.document.location = “135b.html”;


      68 在框架頁面之間共享腳本
      如果在frame1中html文件中有個腳本

      1: function doAlert() {
      2: window.alert(“Frame 1 is loaded”);
      3: }


      那么在frame2中可以如此調(diào)用該方法

      1: <body onLoad=”parent.frame1.doAlert();”>
      2: This is frame 2.
      3: </body>


      69 數(shù)據(jù)公用
      可以在框架頁面定義數(shù)據(jù)項,使得該數(shù)據(jù)可以被多個框架中的頁面公用

      1: <script language=”JavaScript”>
      2: var persistentVariable = “This is a persistent value”;
      3: </script>
      4: <frameset cols=50%,*>
      5: <frame name=”frame1” src="/”138a.html">
      6: <frame name=”frame2” src="/”138b.html">
      7: </frameset>


      這樣在frame1和frame2中都可以使用變量persistentVariable
      70 框架代碼庫
      根據(jù)以上的一些思路,我們可以使用一個隱藏的框架頁面來作為整個框架集的代碼庫

      1: <frameset cols=0,50%,*>
      2: <frame name=”codeFrame” src="/”140code.html">
      3: <frame name=”frame1” src="/”140a.html">
      4: <frame name=”frame2” src="/”140b.html">
      5: </frameset>

        本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
        轉(zhuǎn)藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多