【问题标题】:What is this google adsense code doing exactly?这个 google adsense 代码到底在做什么?
【发布时间】:2009-08-19 19:47:24
【问题描述】:

嘿,我正在努力加深对 javascript 的了解,并想知道是否有人可以向我解释以下脚本中到底发生了什么:

<– Begin Google Adsense code –>
<script type=”text/javascript”>
google_ad_client = “ad-client-code-goes-here”;
google_ad_slot = “ad-slot-code-goes-here”;
google_ad_width = 300;
google_ad_height = 250;
</script>
<script type=”text/javascript”
src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>
<– End Google Adsense code –>

最重要的是,为什么开头有4个'google_ ad_ ...',它们的目的是什么?

逐行解释会很棒:)

感谢您的帮助。我真的很感激。

【问题讨论】:

    标签: javascript adsense


    【解决方案1】:

    google_ad... 是变量(将此代码与您的帐户相关联,设置广告的宽度/高度等)。正在为稍后加载的脚本 (show_ads.js) 设置它们。

    有关变量的完整列表,请参阅CyberNAC Javascript Variables used in Adsense

    【讨论】:

      猜你喜欢
      • 2014-12-01
      • 2013-09-01
      • 1970-01-01
      • 2012-03-07
      • 2012-01-24
      • 1970-01-01
      • 2018-04-19
      • 2015-07-08
      • 2010-10-03
      相关资源
      最近更新 更多