如何解决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 举报,一经查实,本站将立刻删除。