Click to return to the previous page of the code example:
In the Web page, often see such an effect, click on a button, text or image can go back to the previous step to browse the page, the following gives the code example, I hope to be able to bring help to the needs of friends, code examples are as follows:
A. Click the button to return to the previous page:
<type= "button" onclick= "Javascript:history.back ( -1);" value = "Back to previous page" />
Two. Click the image to return to the previous page:
<src= "images/bt.jpg" border= "0" onclick= " Javascript:history.back ( -1); " >
Three. Click on the text to return to the previous page:
<href= "#" onclick= "Javascript:history.back ( -1); return False "> return to previous page </a>
Note the last return false to prevent the jump effect.
The original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=8812
For more information, refer to: http://www.softwhy.com/javascript/
Click to go back to previous page code instance