JavaScript client、client、scroll 窗口位置

1p.clientWidth // 可视宽度 width + padding
2p.clientTop // 上边框宽度
3p.clientLeft // 左边框宽度
4p.offsetParent // 获取上一个带有定位的父元素
5p.offsetWidth // 占位宽度 width + padding + border
6p.offsetLeft // 距上一个具有定位元素边框的距离
7
8document.documentElement.clientWidth || document.body.clientWidth // 宽口宽度
9document.documentElement.scrollTop / Left // 已滚动出的距离

javascript 获取 client、offset值