所以我有一个使用Google的Chart 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>