我在这样的页面中有一个广告和一个链接:
<!DOCTYPE html>
<head profile="http://www.w3.org/1999/xhtml/vocab">
<title>DPT - Asynchronous + Single Rest Architecture</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type='text/javascript'>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
(function() {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') +
'//www.googletagservices.com/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();
</script>
<script type='text/javascript'>
googletag.cmd.push(function() {
googletag.pubads().enableAsyncRendering();
googletag.defineSlot('/1001256/Home_Top_Leaderboard_728x90', [728, 90], 'div-gpt-ad-1342320102476-72').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>
<body>
<div id="div-gpt-ad-1342320102476-72" style="width:728px; height:90px;">
<script type="text/javascript">
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1342320102476-72'); });
</script>
</div>
<a id="refresh" href="#">Refresh ad</a>
<script type='text/javascript'>
(function ($) {
$('#refresh').click(function() {
googletag.cmd.push(googletag.pubads().refresh());
return false;
});
})(jQuery);
</script>
</body>
</html>
第一次点击链接时,广告会刷新。其他时间什么都没有发生。即使只是在 Firebug 等中调用 refresh() 方法,在第一次之后也无济于事。
以上有什么问题?