0

所以我有一个使用谷歌图表 API 的测试站点。我想在这个网站上放一个 Adsense 横幅。当我添加 Adsense 代码时,图表不会显示,但广告会显示。取出 Adsense 代码,图表显示正常。

编辑:Adsense 代码放在哪里也没关系。如果它在那里,则图表不存在。

这是整个页面:

<html>
  <head>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Date', 'Price'],

            ['Yesterday', 10.00],
            ['Today', 12.00],


        ]);

        var options = {
          title: 'kyurem'
        };

        var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
    <div>
        <h3>doeiqts's Pokemon Price Guide</h3>
    </div>

    <div id="adsense">
        <script type="text/javascript"><!--
        google_ad_client = "ca-pub-4255182576260971";
        /* Pokemon Graph */
        google_ad_slot = "2704848389";
        google_ad_width = 728;
        google_ad_height = 90;
        //-->
        </script>
        <script type="text/javascript"
        src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
    </div>

    <div id="cardPicture" style="height: 400px; width: 227px; float: left;">
        <img src=http://pokegym.net/gallery/displayimage.php?imageid=53682 style="height: 320px; width: 227px; position: relative; top: 80px;" />
    </div>
    <div id="chart_div" style="width: 900px; height: 500px; float: left;"></div>

    <div style="clear: both;">
        <p>
        <br>
        <p>
        This site is not affiliated with Nintendo, Pokemon, PokeGym, or eBay.
    </div>


  </body>
</html>
4

0 回答 0