• js write google广告


    document.writeln("<script type=\"text\/javascript\"><!--");
    document.writeln('google_ad_client = "pub-5203053864771666";');
    document.writeln('google_ad_format = "js_sdo";');
    document.writeln('google_cts_mode = "rs";');
    document.writeln('google_num_cts = "2";');
    document.writeln('google_searchbox_width = 215;');
    document.writeln('google_searchbox_height = 26;');
    document.writeln('google_link_target = 2;');
    document.writeln('google_logo_pos = "left";');
    document.writeln('google_rs_pos = "right";');
    document.writeln('google_ad_height = 35;');
    document.writeln('google_ad_width = 560;');
    document.writeln('</script>');
    document.writeln('<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_sdo.js%22%3E');
    document.writeln('</script>');

     调用代码如下:
    <div><script language="JavaScript" src=http://www.hongy168.com/ type="text/javascript"></script></div>

    other way:

     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
     <head>
      <meta http-equiv="Content-Type" content="text/html; charset=GBK" />
      <title>a</title>
     </head>
     <body>
      <div style="border:1px dotted;400px">
       <iframe id="frame_content" src="iframe_b.html" scrolling="no" frameborder="0" onload="this.height=100"></iframe>
      </div>
      <div><button onclick="checkHeight()">Check Height</button></div>
      <script type="text/javascript">
       function reinitIframe(){
        var iframe = document.getElementById("frame_content");
        try{
         var bHeight = iframe.contentWindow.document.body.scrollHeight;
         var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
         var height = Math.max(bHeight, dHeight);
         iframe.height =  height;
        }catch (ex){}
       }
       window.setInterval("reinitIframe()", 200);
       
       function checkHeight() {
        var iframe = document.getElementById("frame_content");
        var bHeight = iframe.contentWindow.document.body.scrollHeight;
        var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
        alert("bHeight:" + bHeight + ", dHeight:" + dHeight);
       }
      </script>
     </body>
    </html>

  • 相关阅读:
    QML使用动画连续非线性改变int的取值
    QML粒子系统
    QML获取当前时间
    QML与C++混合编程
    QMLBinding
    QML图形渲染QtGraphicalEffects
    [九度][何海涛] 数组中只出现一次的数字
    [九度][何海涛] 扑克牌顺子
    [九度][何海涛] 最大子向量和
    [九度][何海涛] Move!Move!!Move!!!
  • 原文地址:https://www.cnblogs.com/buaaboyi/p/1727169.html
Copyright © 2020-2023  润新知