2012-02-24 75 views
1

document.body.innerHTML之后被称为Adsense的横幅被重载(测试了Chrome和Firefox):谷歌Adsense中的错误(调用innerHTML后重新加载)?

http://www.maxrev.de/t164.php

<html> 
<head> 
<title>Adsense</title> 
</head> 
<body> 
<div> 
<script type="text/javascript"><!--// 
google_ad_client = "pub-4267689453885886"; 
google_ad_slot = "2753201147"; 
google_ad_width = 728; 
google_ad_height = 90; 
//--></script> 
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> 
</div> 
<script type="text/javascript"><!--// 
setTimeout(function(){document.body.innerHTML += 'Now Adsense will be refreshed!'}, 2000); 
//--></script> 
</body> 
</html> 

这是Adsense的脚本错误或为什么会发生?还是功能?

编辑27.02.2012: 如果等到刷新完成,然后按重新载入页面(F5),您将获得在Firefox此错误消息:

Error: attempt to run compile-and-go script on a cleared scope source: http://pagead2.googlesyndication.com/pagead/osd.js line: 13

似乎并不像一个功能。

回答

0

如果需要追加HTML到您的网页做一个DIV不是在身体

+0

我会的,但是这并不能解释为什么出现这种情况。我试着检查AdSense脚本。但我找不到原因。 innerHTML似乎没有任何变化,并且body child的计数器是不可能的,因为insertBefore()等不会导致刷新。 – mgutt 2012-02-27 20:37:33