我使用jQuery Mobile框架创建了一个移动应用程序。所有页面都在index.php中加载(使用
在每个页面的页脚中,我添加了Admob代码:
<div data-role="page" id="title">
)。在每个页面的页脚中,我添加了Admob代码:
<div data-role="footer">
<script type="text/javascript">
var admob_vars = {
pubid: 'XXXXXX', // publisher id
bgcolor: 'FF9119', // background color (hex)
text: 'FFFFFF', // font-color (hex)
test: false // test mode, set to false to receive live ads
};
</script>
<script type="text/javascript" src="http://mmv.admob.com/static/iphone/iadmob.js"></script>
</div>
结果是所有页面都显示相同的广告,可能是因为所有页面都在index.php中加载(所以在index.php中同时加载了大约10个广告)。
有什么办法可以解决这个问题吗?我该如何展示不同的广告?每个页面请求都进行广告轮换,触发哪个jQuery函数?
谢谢!