Hey there! any question in your mind? Ask It Now!.

Popular Categories

Java Script: onClick a button window scrolldown

+2 votes
asked in Programming by mHelpMe (670 points)
I want a button on web page in which when user click on that button window should scroll down, How can we do it with simple java script?

Thanks For Answering !

1 Answer

+2 votes
answered by amit_pammu Expert (5,030 points)
selected by mHelpMe
Best answer
<!DOCTYPE html>
<p>it might be helpful for you!.</p>
<button onclick="scrollWin(0,100)" style="position:fixed;">Scroll down</button><br><br>
<div style="border:1px solid black;background-color:lightblue;height:7500px;width:5000px;">
function scrollWin(x,y)
commented by mHelpMe (670 points)
Wow Thanks amit_pammu its working ...Could you explain the code here how its happening actually i am new in programming.
commented by amit_pammu Expert (5,030 points)
basically , its just a javascript predefined window property,,scrollBy...
and you have to just give the dimensions .
like..the above code!!!.

Related Questions

+6 votes
1 answer 2,895 views
+5 votes
2 answers 1,305 views
+3 votes
1 answer 98 views
+1 vote
1 answer 195 views
+1 vote
1 answer 949 views
+5 votes
1 answer 1,240 views

Not a Member yet?

Ask to Folks Login

My Account
252 Folks are online
0 members and 252 guest online
Your feedback is highly appreciated