<script>
window.onload = function () {
alert(document.body.clientHeight);
</script>页面中有个 table 里面的数据是由asp动态生成的(高度有大概2000多px),用上面的代码却得不到相应的高度,只是得到个600多的px
window.onload = function () {
alert(document.body.clientHeight);
</script>页面中有个 table 里面的数据是由asp动态生成的(高度有大概2000多px),用上面的代码却得不到相应的高度,只是得到个600多的px
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body{margin:0px;height:0px;}
</style>
<script type="text/javascript">
window.onload=function(){
alert(document.documentElement.scrollHeight );
}
</script>
</head>
<body>
<div style="height:1000px;"></div>
</body>
</html>