iframe和样式无法加载?

问题描述

我正在使用Google广告管理器来制作一种广告,因此[text]是广告的参数

 console.log("BAUER - hero video 1.1.14");
    //remove standard skin
    $(window.parent.document).find("body").removeClass("has-skin");
    //console.log("BAUER - trigger skin function");
    $(document).ready(function() {
        window.parent.parkers_dfp.setupSkin();
        console.log("BAUER - add class");
    });
    console.log("BAUER - trigger skin function SUCCESS");
  
      var clickThroughUrl = "%%CLICK_URL_UnesC%%[%ClickThroughURL%]";
  
  $(document).ready(function() {
     
window.parent.document.getElementById('google_ads_iframe_/24156345/SMODAUTOMOTIVE/SMOD_Parkers/homepage/overlay/Home_0').setAttribute("id","thisherovideotakeover");
    
    var overlay = $(window.parent.document).find('#overlay');     
    overlay.wrap('<a href="' + clickThroughUrl + '" target="_blank"></a>');
    
  
    var head = window.parent.document.getElementsByTagName("head")[0];
    var style = document.createElement("style");
    head.appendChild(style);
    style.setAttribute("type","text/css");
    var styling = document.createTextNode("@media screen and (max-width: 411px) {#thisherovideotakeover {width: 100%;height: 72vh;}}@media screen and (min-width: 411px) and (max-width: 1024px) {#thisherovideotakeover {width: 100%;height: 70vh;}}@media screen and (min-width: 1024px) {#thisherovideotakeover {width: 100%;height: 80vh;}}")
    style.appendChild(styling);
  
  
});
  </script>
<iframe src="[%HtmlVideo%]" title="hero-video" style="display:block;width:100%;height:100vh;border:none;"></iframe>
  <img class="pixel-counter" src="[%PixelCounter%]" style="display: none;">

有人能弄清楚为什么最后没有加载iframe吗?或在textnode中应用的样式?我也必须使用DOM操作。我对此深感困惑。

我需要的是能够单击的东西,这是我使之起作用的唯一方法

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...