Go back link in Javascript
I had problem giving the back link and I found this solution:
This helped me. Hope this will be useful to you as well.
goback.html
<html> <head> <title>Go Back Test</title> </head> <body> Go Back to Previous link, Test Page <br/><br/> Click the link below for the test: <br/><br/> <a href="goback2.php">CLICK ME</a> </body> </html>
goback2.php
<?php echo "Thank You for visiting."; echo "<br/><br/>"; echo "Please click ANY of the given link to go back to the previous page: "; //go back to the previous page echo "<a href='javascript:self.history.back();'>Go Back</a> | "; //the above link can also be used in this way echo "<a href='javascript:self.history.go(-1);'>Go Back</a>"; ?>
Thank You.
Related posts:
- Javascript: Show/Hide HTML elements
- PHP Javascript : Playing with multi-dimensional array
- print_r in Javascript
- Javascript: Add Remove HTML elements
- Page refresh in PHP
- Javascript: How to Submit form and Change form action?
- Javascript: How to get current URL without Query string?
- Javascript: Show Hide textbox text on focus
- Website statistic (User Information) in Javascript
- Making a tree navigation menu in PHP
