<script type="text/javascript">
window.onload = function(){
var Box =document.getElementById("box")
//获取元素的宽度
var boxw = box.offsetWidth;
//获取元素的高度
var boxH = box.offsetHeight;
}
window.onload = function(){
var Box =document.getElementById("box")
//获取元素的宽度
var boxw = box.offsetWidth;
//获取元素的高度
var boxH = box.offsetHeight;
}
</script>