iframe自适应宽度
2016-01-22 13:01
253 查看
<iframe id="course_content" style="width:100%;margin:5px 0 0;" scrolling="no" src="<?php ?>" ></iframe>
<script> $("#course_content").load(function() { var iframeHeight = $(this).contents().find("div.para").height(); if(iframeHeight<180) { var iframeHeight = $(this).contents().find("body").height(); $(this).height(iframeHeight+30); } else{ //alert(iframeHeight+160); $(this).height(iframeHeight+160); } }); </script>
相关文章推荐
- LINQ 按多个字段排序(orderby、thenby、Take)
- javascript的String对象截取字符串的方法
- Android系统信息和安全机制(学习笔记)
- Open /dev/ttyUSB* with not a root user method
- 上传文件到http服务器上
- Cocos物理引擎刚体的3种掩码
- POJ题目排序的Java程序
- 灾备
- K-means聚类算法
- android XML动画初步解析(activity界面之间跳转demo)
- ArcGIS For Flex报错
- 闪回
- IOS开发知识(一)
- zabbix 监控 nginx
- 真机运行程序Xcode提示The identity used to sign the executable is no longer valid
- Spring MVC学习详解
- 利用pageControl 来做自动轮播
- Qt下定时器的使用
- 江西省委常委赵智勇被免 无被查字眼 媒体推測窝案
- servlet学习总结