详解javascript中offsetTop/Left、offsetWidth/Height、clientWidth/clientHeight
javascript中获取元素的尺寸位置等,有好多个属性(clientWidth,clientHeight,offsetWidth,offsetHeight,scrollWidth,scrollHeight)等,本文主要介绍各自属性的意义。一、对于获取div尺寸clientWidth=width+paddingclientHeight=height+paddingoffsetWidth=width