div的样式如下:
width:300px;
height:200px;
padding:10px;
border:10px solid #ccc;
background:#eee;
font-size:12px;
则:
IE6.0、FF1.06+:
clientWidth = width + padding = 300+10×2 = 320
clientHeight = height + padding = 200+10×2 = 220
offsetWidth = width + padding + border = 300+10×2+10×2= 340
offsetHeight = height + padding + border = 200+10×2+10×2 = 240
IE5.0/5.5:
clientWidth = width - border = 300-10×2 = 280
clientHeight = height - border = 200-10×2 = 180
offsetWidth = width = 300
offsetHeight = height = 200
</script>