js广告代码放在js文件中改写怎么写?

ytuionnn 2014-09-17 11:06:18
我自己是这么改的,但是一直出不来,求指正
document.writeln("<\script src=\"//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 970*250 -->
<ins class="adsbygoogle"
style="display:inline-block;width:970px;height:250px"
data-ad-client="ca-pub-9055653551438880"
data-ad-slot="7443996645"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>");
...全文
360 4 打赏 收藏 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ytuionnn 2014-09-18
  • 打赏
  • 举报
回复
引用 3 楼 jslang 的回复:

document.writeln('<script src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></scr'+'ipt>'
+' <!-- 970*250 -->'
+' <ins class="adsbygoogle"'
+' style="display:inline-block;width:970px;height:250px"'
+' data-ad-client="ca-pub-9055653551438880"'
+' data-ad-slot="7443996645"></ins>'
+' <script>'
+' (adsbygoogle = window.adsbygoogle || []).push({});'
+' </scr'+'ipt>'); 
可以了,谢谢啊
天际的海浪 2014-09-18
  • 打赏
  • 举报
回复

document.writeln('<script src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></scr'+'ipt>'
+' <!-- 970*250 -->'
+' <ins class="adsbygoogle"'
+' style="display:inline-block;width:970px;height:250px"'
+' data-ad-client="ca-pub-9055653551438880"'
+' data-ad-slot="7443996645"></ins>'
+' <script>'
+' (adsbygoogle = window.adsbygoogle || []).push({});'
+' </scr'+'ipt>'); 
save4me 2014-09-18
  • 打赏
  • 举报
回复
<\script的反斜杠干嘛的?

87,984

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧