通过iframe引入另外一个项目中的html片段到项目中,解决样式,高度,兼容等问题的策略
2015-06-26 10:57
1096 查看
<!--尾部开始-->
<iframe src="http://172.16.24.11:9000/cartoon-web/footer_new"
marginheight="0" marginwidth="0" frameborder="0" scrolling="no"
width='100%' height='392' id="iframepage" name="iframepage" onLoad="iFrameHeight()" ></iframe>
<!--尾部结束-->
<script language="javascript" type="text/javascript" charset="utf-8" src="js/jquery-2.1.1.js"></script>
<script language="javascript" type="text/javascript" charset="utf-8">
$(function(){
$(".wj_content form table tbody tr td.title").each(function(index,domEle){
$(this).text((index+1) + "、" +$(this).text());
});
});
function iFrameHeight() {
var ifm= document.getElementById("iframepage");
var subWeb = document.frames ? document.frames["iframepage"].document :ifm.contentDocument;
if(ifm != null && subWeb != null) {ifm.height = subWeb.body.scrollHeight;}
}
</script>
<iframe src="http://172.16.24.11:9000/cartoon-web/footer_new"
marginheight="0" marginwidth="0" frameborder="0" scrolling="no"
width='100%' height='392' id="iframepage" name="iframepage" onLoad="iFrameHeight()" ></iframe>
<!--尾部结束-->
<script language="javascript" type="text/javascript" charset="utf-8" src="js/jquery-2.1.1.js"></script>
<script language="javascript" type="text/javascript" charset="utf-8">
$(function(){
$(".wj_content form table tbody tr td.title").each(function(index,domEle){
$(this).text((index+1) + "、" +$(this).text());
});
});
function iFrameHeight() {
var ifm= document.getElementById("iframepage");
var subWeb = document.frames ? document.frames["iframepage"].document :ifm.contentDocument;
if(ifm != null && subWeb != null) {ifm.height = subWeb.body.scrollHeight;}
}
</script>
相关文章推荐
- css实现相册方式展现的字母表
- WPF:自定义控件之Button-自定义样式,共用样式
- CSS编写规范
- 纯CSS代码表现一座漂亮的房子的特效
- 纯CSS“三角边”的实现
- CSS中常用中文字体转Unicode编码表
- openlayer 高亮显示样式
- input file文件上传样式
- The CSS3 Placeholder Pseudo-element
- CSS定位规则之BFC 你竟然一直不知道的东西!!!!!
- 布局转换——考验CSS功底的时刻到来
- CSS基础
- CSS 预处理器
- [CSS]IE6和360浏览器兼容模式下的兼容性问题
- 初探CSS 4选择器
- css 关于overflow:hidden对float的影响
- 高性能 CSS3 动画
- 转:【总结】浏览器CSS Hacks汇总,浏览器兼容方式CSS Hacks
- GridView用CSS设定样式
- css hack