0

我正在尝试在地图上显示 Adsense 广告,但 Internet Explorer 又一次让我很难过。广告显示在我尝试过的所有其他浏览器(chrome、ff、safari、opeara)上,但在 internet explorer 上。有没有人遇到过这个?这是我的广告经理代码:

var publisherID = 'ca-pub-6630823543717184';

var adsManagerOptions = {
maxAdsOnMap : 1,
style: 'adunit',
channel: '5611474977'
};
adsManager = new GAdsManager(map, publisherID, adsManagerOptions);
adsManager.enable();

我正在使用 xhtml1-strict doctype

4

1 回答 1

2

我找到了解决方案。您必须将脚本版本声明为 v=2.x 而我有 v=2

正确方法:

<script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=YOUR_KEY_HERE&amp;sensor=false"
type="text/javascript"></script>

我有

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=YOUR_KEY_HERE&amp;sensor=false"
    type="text/javascript"></script>

这个小疏忽导致 IE 不在我的地图上显示谷歌广告。问题解决了!

于 2010-03-28T13:29:22.883 回答