topical media & game development
professional-javascript-09-OnScrollExample3.htm / htm
<html>
<head>
<title>OnScroll Example</title>
<script type="text/javascript">
window.onscroll = function () {
var oTextbox = document.getElementById("txt1");
oTextbox.value += "\nscroll is at " + document.body.scrollLeft + " horizontally and " + document.body.scrollTop + " vertically.";
}
</script>
</head>
<body>
<p>Try scrolling this window.</p>
<p><textarea rows="15" cols="50" id="txt1"></textarea>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</body>
</html>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.