如何将 Adsense 广告放入 javascript 标签中?
<script type="text javascript">
var ad = "<script type="text/javascript"><!--
google_ad_client = "ca-pub-12345";
google_ad_slot = "12345";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>";
</script>
以上显然是行不通的。但是,它展示了我正在尝试做的事情。任何人都可以弄清楚如何有效地做到这一点?谢谢。
更新 这仍然给我一个语法错误
var ad = "<script type='text/javascript'><!--
google_ad_client = 'ca-pub-12345';
/* plastic surgery body large banner */
google_ad_slot = '12345';
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type='text/javascript'
src='http://pagead2.googlesyndication.com/pagead/show_ads.js'>
</script>";