日期:2014-05-17 浏览次数:20714 次
<BODY style="margin:0;padding:0;"> <iframe id="iframe" width="0" height="0" scrolling="Auto" frameborder="0" marginwidth="0" marginheight="0" ></iframe> <SCRIPT LANGUAGE="JavaScript"> var f= document.getElementById("iframe"); f.src="http://www.163.com"; f.width="100%"; f.height="100%"; </SCRIPT> </BODY>
<!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> new document </title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="generator" content="editplus" /> <meta name="author" content="yixianggao@126.com" /> <meta name="keywords" content="" /> <meta name="description" content="" /> <style type="text/css"> html { overflow: auto; } </style> </head> <BODY style="margin:0;padding:0;"> <iframe id="iframe" width="0" height="0" scrolling="Auto" frameborder="0" marginwidth="0" marginheight="0" ></iframe> <SCRIPT LANGUAGE="JavaScript"> var f= document.getElementById("iframe"); f.src="http://www.163.com"; f.width="100%"; f.height="100%"; </SCRIPT> </BODY> </html>
------解决方案--------------------
<iframe src="http://www.163.com" id="iframe" scrolling="Auto" width="100%" frameborder="0" marginwidth="0" marginheight="0" ></iframe> <script language="javascript"> document.getElementById("iframe").height=document.getElementById("iframe").document.documentElement.clientHeight-4; </script>
------解决方案--------------------
<iframe src="http://www.163.com" id="iframe" scrolling="no" width="100%" frameborder="0" marginwidth="0" marginheight="0" onload="this.height=document.getElementById('iframe').contentWindow.document.body.scrollHeight+10;"></iframe>