zoukankan      html  css  js  c++  java
  • ifame_自适应高度

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>一键分享</title>
    </head>

    <body>
    <script src="js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" language="javascript">

        function iFrameHeight() {

            var ifm= document.getElementById("iframepage");

            var subWeb = document.frames ? document.frames["iframepage"].document :

        ifm.contentDocument;

                if(ifm != null && subWeb != null) {

                ifm.height = subWeb.body.scrollHeight;

                }

        }

    </script>
     <iframe src="#"  width="100%" height="auto" frameborder="0" marginheight="0" marginwidth="0" id="iframepage" name="iframepage" onLoad="iFrameHeight()" scrolling="no"></iframe>
    </body>
    </html>

  • 相关阅读:
    杭电2063 过山车 匈牙利算法
    杭电2023 平均成绩
    leveldb性能分析
    linux下libreoffice安装测试
    iptables配置vsftp访问
    vsftp访问异常
    mysql二进制安装
    vi命令
    mysql配置优化
    rsync 配置
  • 原文地址:https://www.cnblogs.com/zhouyx/p/4165348.html
Copyright © 2011-2022 走看看