使用zoom属性<body style="zoom:0.59;">
<table style="width:1500;height:1000" border="1">
<tr><td>asdasdasd</td></tr>
</table>
</body>
<table style="width:1500;height:1000" border="1">
<tr><td>asdasdasd</td></tr>
</table>
</body>
// iframe 必须要指定id的值function changeIframe() //自适应width和height
{
if(top != self)
{
window.parent.document.getElementById(self.name).height =
document.body.scrollHeight + 1;
window.parent.document.getElementById(self.name).width =
document.body.scrollWidth + 1;
}
}这是iframe的auto 吗? 这和需求不一样啊?需求是iframe大小固定,由于网站太大,因此要把网站缩小后放在IFRAME中
<iframe src="http://www.baidu.com" onload="this.height = this.document.body.offsetHeight;this.width=this.document.body.offsetWidth;"></iframe>