function getScrollXY() { document.getElementById("scroll_position").value = document.getElementById("screenDiv").scrollTop; } function setScrollXY() { var pos = document.getElementById("scroll_position").value; var objDiv = document.getElementById("screenDiv"); objDiv.scrollTop = parseInt(pos); }
The key is document.getElementById("yourdiv").scrollTop
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment