Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6ed9c1 commit 7e41017Copy full SHA for 7e41017
dom/element.md
@@ -239,7 +239,7 @@ function checking(){
239
240
`Element.scrollLeft`属性表示网页元素的水平滚动条向右侧滚动的像素数量,`Element.scrollTop`属性表示网页元素的垂直滚动条向下滚动的像素数量。对于那些没有滚动条的网页元素,这两个属性总是等于0。
241
242
-如果要查看整张网页的水平的和垂直的滚动距离,要从`document.body`元素上读取。
+如果要查看整张网页的水平的和垂直的滚动距离,要从`document.body`元素上读取。然而,对于`scrollTop`,在有声明DTD的时候,需要从`document.documentElement`获取,没有声明DTD的时候,才可以从`document.body`上获取。
243
244
```javascript
245
document.body.scrollLeft
0 commit comments