iframe自适应高度

来源:互联网 发布:java uml类图生成工具 编辑:程序博客网 时间:2024/03/29 21:45

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<iframe src="x.htm" name="content" id="content" allowtransparency="true" align="default" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" height="200" width="780" onload="this.height=0;var fdh=(this.Document?this.Document.body.scrollHeight:this.contentDocument.body.offsetHeight);this.height=(fdh&gt;200?fdh:200)">This message is only visible to older browsers.</iframe>
</body>
</html>
原创粉丝点击