Google广告屏蔽了onload活动

时间:2012-08-29 20:14:26

标签: 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">
     <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>

0 个答案:

没有答案