User Id :    Password :      New Member   Forgot Password  
 
How to move the scroll bar by java script function
Description Move the scroll bar by java script function   No. of Views     950
  Rating     5
Author Gaurav   Posted On     15 Nov 2010
Tags Java Script    

Sample Code   Download Code

How to move the scroll bar by java script function

Some time user want to shift the scroll bar when the page render infront of the user.

You can do that by using the java script.By following the below code.
 

<script language="JavaScript"> 
 function func()
{    
  window.scrollTo(100,100);  
} 
 function function1()
{    
  window.scroll(500,500);  
}  
</script> 
<input value="Scroll(100,100)" onclick="func();" type="button">  
<input value="Scroll(500,500)" onclick="function1();" type="button">

Keep coding.....

About Author

About Author I am as simple as c#. Gaurav
No Photo
 
Country India
Company N/A
Home Page N/A

Rate this article

Rating options from poor, fair, good, very good to excelent.  
 

Comments

 
 
Posted By Annonymous on 23 Jan 2011 at 11:13 AM
 
am confused? you raised the question and answered it. do the question raised and the code given by you are with delay in getting the answer? Before posting to you, replicated the code snipp given above could not understand the usage. could you please make my knowledge understandable. thanks in advance,
 
 
   
Write your comment here.
Comment
Verification Code