+2 votes
in Programming by (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
by Expert (5.1k points)
selected by
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)
by (670 points)
Wow Thanks amit_pammu its working ...Could you explain the code here how its happening actually i am new in programming.
by Expert (5.1k points)
basically , its just a javascript predefined window property,,scrollBy...
and you have to just give the dimensions .
like..the above code!!!.

Not a Member yet?

Ask to Folks Login

My Account

Your feedback is highly appreciated