OpenX 和 GWT 之间的集成



我有GWT项目,我需要向这个项目添加一些广告,所以我们决定使用OpenX作为创建添加到网站的管理员。 所以经过调查,我们发现 OpenX 生成了添加的代码,如以下示例所示:

 <script type='text/javascript'><!--//<![CDATA[
   var m3_u = (location.protocol=='https:'?'openXURL':'openXURL');
   var m3_r = Math.floor(Math.random()*99999999999);
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?what=SearchCriteria");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'></scr"+"ipt>");
//]]>--></script><noscript><a href='openXURL?n=a98f1030&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='openXURL??what=SearchCriteria&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a98f1030' border='0' alt='' /></a></noscript>

所以我问的是如何在 GWT 中渲染这个 JavaScript 代码?

我发现 OpenX 将上面的代码生成为 ifram,所以我得到了他的 ifram 代码并将其添加到 html 面板中,它工作正常。

最新更新