ifrom自动适应大小
首先在页面中加入
<script type="text/javascript">
function autofitframe()
{
try{
document.getElementById("mainifr").style.height=mainifr.document.body.scrollHeight;
}catch(e)
{
}
}
</script>
然后在ifrom进行如下设置就行了,是不是很简单啊?O(∩_∩)O哈哈~
<td valign="top" style="width: 697px;">
<iframe id="mainifr" name="mainifr" style="width:100%;" frameborder="0" scrolling="no" onload='autofitframe()';></iframe>
</td>
注意,td中不要设置高度是多少。
我的淘宝:http://shop58816553.taobao.com/