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

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

    • 分享

      JavaScript應用:Iframe自適應其加載的內(nèi)容高度

       昵稱8331 2006-06-16

      //main.htm:

      <html>
      <head>
      <meta http-equiv=‘Content-Type‘ content=‘text/html; charset=gb2312‘ />
      <meta name=‘a(chǎn)uthor‘ content=‘F.R.Huang(meizz梅花雪)//www.meizz.com‘ />
      <title>iframe自適應加載的頁面高度</title>
      </head>

      <body>
      <iframe src="child.htm"></iframe>
      </body>
      </html>

      //child.htm:

      <html>
      <head>
      <meta http-equiv=‘Content-Type‘ content=‘text/html; charset=gb2312‘ />
      <meta name=‘a(chǎn)uthor‘ content=‘F.R.Huang(meizz梅花雪)//www.meizz.com‘ />
      <title>iframe 自適應其加載的網(wǎng)頁(多瀏覽器兼容)</title>
      <script type="text/javascript">
      <!--
      function iframeAutoFit()
      {
      var ex;
      try
      {
      if(window!=parent)
      {
      var a = parent.document.getElementsByTagName("IFRAME");
      for(var i=0; i<a.length; i++) //author:meizz
      {
      if(a[i].contentWindow==window)
      {
      var h1=0, h2=0;
      if(document.documentElement&&document.documentElement.scrollHeight)
      {
      h1=document.documentElement.scrollHeight;
      }
      if(document.body) h2=document.body.scrollHeight;

      var h=Math.max(h1, h2);
      if(document.all) {h += 4;}
      if(window.opera) {h += 1;}
      a[i].style.height = h +"px";
      }
      }
      }
      }
      catch (ex){}
      }
      if(document.attachEvent)
      {
      window.attachEvent("onload", iframeAutoFit);
      window.attachEvent("onresize", iframeAutoFit);
      }
      else
      {
      window.addEventListener(‘load‘, iframeAutoFit, false);
      window.addEventListener(‘resize‘, iframeAutoFit, false);
      }
      //-->
      </script>
      </head>
      <body>
      <table border="1" width="200" style="height: 400px; background-color: yellow">
      <tr>
      <td>iframe 自適應其加載的網(wǎng)頁(多瀏覽器兼容,支持XHTML)</td>
      </tr>
      </table>
      </body>
      </html>

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

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多