Html Google广告阻止加载事件
为什么下面的html禁止触发onload事件?如果我将谷歌广告代码注释掉,那么事件确实被触发了。我只在Mac Os X上测试过firefox 15.0Html Google广告阻止加载事件,html,onload,adsense,Html,Onload,Adsense,为什么下面的html禁止触发onload事件?如果我将谷歌广告代码注释掉,那么事件确实被触发了。我只在Mac Os X上测试过firefox 15.0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
function load()
{
alert("Hello")
}
</script>
</head>
<body onload="load()">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-XXXXXXXXXXXXX";
/* iKarta main */
google_ad_slot = "XXXXXXXX";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</body>
</html>
函数加载()
{
警报(“你好”)
}
我在JSFIDLE和我的服务器上测试了它,效果很好,firefox中与此代码关联的页面的标签中的加载图标一直在旋转。我可以尝试什么解决方法?您的代码在FF15中运行得很好。代码实际上可以在我的服务器上运行,但不能在我的机器上本地运行。为什么呢?