java – 如何将Google Adsense放在GWT中

有没有人知道如何将Google adsense广告放在GWT网络应用程序中?

解决方法

您可以将Adsense中的 JavaScript代码放在GWT开始的单个HTML页面中.这样广告不会显示在与GTW相同的区域,而是在GWT代码之上/之下.对于可能是广告

这个例子在应用程序之上放置一个空白:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <Meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>www.javaoracleblog.com</title>
    <script type="text/javascript" language="javascript" src="com.javaoracleblog.aggregator.nocache.js"></script>
  </head>
  <body>
<script type="text/javascript"..
ADsense code here 
</script>
    <!-- OPTIONAL: include this if you want history support -->
    <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
  </body>
</html>

为了向Google WT表明Google adsense的网站可以信任,您需要向-whitelist命令行参数添加正则表达式匹配的URL.

请注意,这可能无法解决上述“为什么我倾倒GWT”文章中所述的问题.

相关文章

最近看了一下学习资料,感觉进制转换其实还是挺有意思的,尤...
/*HashSet 基本操作 * --set:元素是无序的,存入和取出顺序不...
/*list 基本操作 * * List a=new List(); * 增 * a.add(inde...
/* * 内部类 * */ 1 class OutClass{ 2 //定义外部类的成员变...
集合的操作Iterator、Collection、Set和HashSet关系Iterator...
接口中常量的修饰关键字:public,static,final(常量)函数...