JavaScript各种宽高属性 在JavaScript中存在各种宽高属性,如height, clientHeight, innerHeight,outerHeight等等,那么它们究竟有什么区别呢? 在了解这些属性的区别之前,我们需要先来了解window和document的区别: 1. window和document * Window对象表示浏览器打开的窗口,调用window对象上的方法可以省略window,如console.log(), alert等; * Document对象是Window对象的一部分,浏览器的HTML文档成为Document对象。 * window对象的 Continue reading