【问题标题】:Hide external Iframe Criteo async tag when passback empty回传为空时隐藏外部 Iframe Criteo 异步标记
【发布时间】:2016-01-13 15:12:01
【问题描述】:

希望有人可以帮助我们。当没有加载横幅时,我们需要隐藏一个外部 iframe,而不需要异步 Criteo 标签创建的回传(导致空白区域)。任何的想法?

这是标签:

    <div id="one" margin="0px">
    <script>
    var cto_zoneid_desktop = "xxxxxx";
    var cto_zoneid_mobile = "xxxxxx";
     var cto_lim_w = 700,cto_lim_h = 200,cto_zoneid_selected = cto_zoneid_desktop;
    if( window.screen.width<window.cto_lim_w || window.screen.height<window.cto_lim_h){cto_zoneid_selected = cto_zoneid_mobile;}
    var crt_curl = '#CLICK_URL_UNESC#';
    (function(w,d,s,c,z,u){var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),l = '&loc=' + encodeURIComponent(w.location), r = d.referrer ? '&referer=' + encodeURIComponent(d.referrer) : '', g = u.substring(0,4) == 'http' ? '&ct0='+encodeURIComponent(u) : '', cb="&cb="+Math.floor(Math.random()*99999999999) ;j.async='true';j.src=(("https:"==location.protocol?"https:":"http:")+
    '//cas.criteo.com/delivery/ajs.php?zoneid='+z+'&containerid='+c+g+l+r+cb).substring(0,2000);f.parentNode.insertBefore(j,f);
    })(window,document,'script','one',cto_zoneid_selected,crt_curl);
    </script>
    </div>

【问题讨论】:

    标签: jquery asynchronous iframe external criteo


    【解决方案1】:

    我找到了一个解决方案,可以在没有横幅的情况下从 Criteo 隐藏 iframe。在回传代码中输入以下代码:

        <script type="text/javascript">
        window.frameElement.style.display = "none";
        </script>
    

    它有效。希望它可以帮助某人。

    【讨论】:

      猜你喜欢
      • 2011-04-30
      • 1970-01-01
      • 1970-01-01
      • 2017-01-18
      • 1970-01-01
      • 2015-03-12
      • 1970-01-01
      • 1970-01-01
      • 2013-04-27
      相关资源
      最近更新 更多