iframe框架调用高度自适应方法
以下代码加入到你想加的帝国cms模板即可<iframe frameborder="0" src="http://www.daixiao360.cn/" class="iframe" frameborder="0" id="test" onload="this.height=100" width="762px" scrolling="no"&……
以下代码加入到你想加的帝国cms模板即可
<iframe frameborder="0" src="http://www.daixiao360.cn/" class="iframe" frameborder="0" id="test" onload="this.height=100" width="762px" scrolling="no"></iframe><script type="text/javascript">function reinitIframe(){var iframe = document.getElementById("test");try{var bHeight = iframe.contentWindow.document.body.scrollHeight;var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;var height = Math.max(bHeight, dHeight);iframe.height = height;console.log(height);}catch (ex){}}window.setInterval("reinitIframe()", 200);</script>
- 上一篇
帝国cms列表页跳转到内容页的列表模板代码
此代码适用于栏目下面只有一个文章的 例如公司简介,联系我们等单页形式 代码如下<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
- 下一篇
帝国下载不采用弹出窗口式的修改方法
如果不采用弹出式下载的话,可依以下步骤完成:1.修改下载地址模板("公共模板" -> "修改下载地址模板"):将:[ <a href=#edown onclick="window.open('[!--down.url--]','','width=300,height=300');">[!--down.name--]</a