Go back to previous and next page onClick in browser using Javascript | 2my4edge

17 November 2013

Go back to previous and next page onClick in browser using Javascript

Sometimes this script may very useful to every web designers, go back to previous or next page in browser using javascript. here we are going to see how make, go back to previous and next page onclick in browser using javascript. let see the simple code.
go-back-to-the-previous-next-page-in-browser
DOWNLOAD        LIVE DEMO          NEXT PAGE

CODE

<a href="#" onclick="history.go(-1); return false;"> 
Click here to Go back to the Previous page </a> 
<a href="#" onclick="history.go(+1); return false;">
Click here to Go to the Next page </a>

the above simple code make the previous and next page location onClick. history.go(-1); is make go back one time back. similarly we can make change any number, as we need, where to go and how page back. that's what the number mentioned. history.go(+1); is make go to next page in browser.

we can make this in input button also, there also we want to make Onclick function.

i hope this post is very useful to everyone. thank you.  


RELATED POSTS:





No comments:

Post a Comment

^