获得div高度

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
<script type="text/javascript">
function aa(){
alert(document.getElementById("userBlog").offsetHeight+"px");
}
</script>
</head>
<body onload="aa();">
<div id="userBlog">Content for New Div<br /><br /> Tag Goes Here</div>
</body>
</html>
阅读全文
类别:Web 查看评论

posted on 2010-02-23 10:29  plume  阅读(171)  评论(0编辑  收藏  举报

导航