表格自适应页面高度
<html>
<head>
<title>...</title>
<script language="JavaScript" type="text/javascript">
function x(){
var y=""
y+='scrollHeight:'+document.body.scrollHeight;
y+=' offsetHeight:'+document.body.offsetHeight;
y+=' clientHeight:'+document.body.clientHeight;
//document.body.appendChild(document.createTextNode(y))
window.alert(y);
if(document.body.scrollHeight<document.body.offsetHeight)
{
mytab.height+=(document.body.offsetHeight-document.body.scrollHeight)
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
body {
margin-top: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<body onload="x();">
<table width="514" height="300" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#666666" id="mytab">
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
