• 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>

  • 相关阅读:
    docker
    算法学习 —— 动态规划练习(二)
    算法学习 —— 动态规划练习(一)
    算法学习——动态规划讲解
    Java核心复习——CompletableFuture
    Java源码阅读(八)—— ThreadPoolExecutor
    Java源码阅读(三)—— ThreadLocal
    TensorFlow实现XOR
    实现逻辑回归-神经网络
    深度学习之Numpy整理
  • 原文地址:https://www.cnblogs.com/buaaboyi/p/1727169.html
Copyright © 2020-2023  润新知