zoukankan      html  css  js  c++  java
  • 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>

  • 相关阅读:
    分词器下载地址
    solr 查询方式
    solr 到 lucene
    Solr 安装与使用 Centos7
    线性表-串:KMP模式匹配算法
    金山——弱智的翻译程序
    FL2440移植Linux2.6.33.7内核
    FL2440移植u-boot2011.09
    【转】C/C++除法实现方式及负数取模详解
    循环缓冲类
  • 原文地址:https://www.cnblogs.com/buaaboyi/p/1727169.html
Copyright © 2011-2022 走看看