views:

89

answers:

2

how to move scroll bar by javascript ,

so that the top coordinate of visible area is y px from top coordinate of entire page?

A: 

If you don't mind the overhead, use jQuery library with ScrollTo plugin. A quick demo can be found here: http://demos.flesler.com/jquery/scrollTo/

Oh,but I've already used YUI,which is a big overhead,so best not any more..
Shore
+3  A: 

See the window.scrollTo and window.scrollBy methods.

If you need more flexibility and power than that you might try Flipper's suggestion and give the jQuery plugin a whirl.

Yadyn