Click to go back to previous page code instance

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.