element scroll setters

This commit is contained in:
Zhen Zhang 2016-04-14 15:19:12 +08:00
parent fefdaf76de
commit 11b12f677b
8 changed files with 364 additions and 41 deletions

View file

@ -37,6 +37,10 @@ Curabitur elit lacus, bibendum non tempus a, bibendum sit amet ante. Mauris eget
<script>
var section = document.getElementById("section");
window.setTimeout(function () {
section.scroll(0, 1000);
}, 2000)
window.setInterval(function () {
console.log("scrollTop: " + section.scrollTop);
console.log("scrollLeft: " + section.scrollLeft);