我有两个问题,关于offsetWidth与clientWidth
1.element的client区域,是指border以内的部分,包括element本身的size跟padding
但是,e.clientX的原点,却没有遵循同样的机制,原点并不是body对象的client区域的左上角,而是body的margin区域的左上角
所以,有点矛盾,或者说,不太一致
2.在body有margin值的情况下,如何取得浏览器可显示区域的宽度呢?
body.offsetWidth显然不行,因为不包括margin
The offsetHeight property returns the viewable height of an element in pixels, including padding, border and scrollbar, but not the margin.