errietta Posted August 8, 2008 Share Posted August 8, 2008 is there a way to scroll back up to the start of the page with javascript? i want to put it in <img onclick Link to comment Share on other sites More sharing options...
Synook Posted August 8, 2008 Share Posted August 8, 2008 Why don't you just use HTML and anchors? <a href="#top"><img ... /></a> Link to comment Share on other sites More sharing options...
aspnetguy Posted August 8, 2008 Share Posted August 8, 2008 Using HTML anchors is the best way as it doesn't rely on JS being enabled but if you want or need to use JS only here is how you do it. <img src="..." alt="" onclick="window.scrollBy(0,0)"/> Link to comment Share on other sites More sharing options...
errietta Posted August 9, 2008 Author Share Posted August 9, 2008 Using HTML anchors is the best way as it doesn't rely on JS being enabled but if you want or need to use JS only here is how you do it.<img src="..." alt="" onclick="window.scrollBy(0,0)"/> alright thnx Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.