zoukankan      html  css  js  c++  java
  • 关于iframe的高度自适应问题(js)

    function SetCwinHeight()
    {
      var cwin=document.getElementById("cwin");
      if (document.getElementById)
      {
        if (cwin && !window.opera)
        {
      if (cwin.contentDocument && cwin.contentDocument.body.offsetHeight)
          cwin.height = cwin.contentDocument.body.offsetHeight;
      else if(cwin.Document && cwin.Document.body.scrollHeight)
        cwin.height = cwin.Document.body.scrollHeight;
      }
     }
    }
    <iframe width="778" align="center" height="200" id="cwin" name="cwin" onload="Javascript:SetCwinHeight(this)" frameborder="0" scrolling="no"></iframe>
  • 相关阅读:
    wkhtmktopdf
    linux命令行抓取网页快照
    ubuntu 固定静态IP
    $http questions
    generate_scripts
    network
    IT_Qestion
    day03
    day02
    day01
  • 原文地址:https://www.cnblogs.com/JamKong/p/4489222.html
Copyright © 2011-2022 走看看