动态iframe 分享
Posted kexb
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了动态iframe 分享相关的知识,希望对你有一定的参考价值。
function createIframe() { var i = document.createElement("iframe"); i.src = "/RSK/RskBookFilterManage.aspx?_method=filterContent4RiskBook&riskBookId=" + UTIL.getUrlParam("riskBookId") + "&k=" + Math.random() i.id = "RskBookContentCfg"; i.scrolling = "auto"; i.setAttribute(‘frameBorder‘, 0); i.style.cssText = ‘border: 0 none;‘; //i.frameborder ="0"; i.width ="795px"; i.height ="700px"; document.getElementById("iframe2").appendChild(i); var i2 = document.createElement("iframe"); i2.src = "/RSK/RskSumaryInfomationManage.aspx"; i2.id = "RskBookContentCfg"; i2.scrolling = "auto"; i2.setAttribute(‘frameBorder‘, 0); i2.style.cssText = ‘border: 0 none;‘; //i2.frameborder ="0"; i2.width ="795px"; i2.height ="700px"; document.getElementById("iframe3").appendChild(i2); }; //Check for browser support of event handling capability if (window.addEventListener) window.addEventListener("load", createIframe, false); else if (window.attachEvent) window.attachEvent("onload", createIframe); else window.onload = createIframe;
以上是关于动态iframe 分享的主要内容,如果未能解决你的问题,请参考以下文章
HTML,VUE,嵌入iframe,实现iframe的100%高度和宽度,代码分享