Chad Lupkes wrote:
Quote:
Hi all,
I'm looking for a command in html, dhtml or javascript that will instruct
the browser to jump to the top and bottom of a page. Right now I'm doing it
with anchors, and I'm wondering if there isn't some other way of doing it. |
Anchors are fine as they work even is script is not supported.
If you want to use script then you can use
window.scrollTo(0, 0)
to scroll to the top. To scroll to the bottom you need to find the
length of the page which is browser dependant, try
window.scrollTo(0, document.height ? document.height :
document.body.scrollHeight)
--
Martin Honnen
http://JavaScript.FAQTs.com/