The trick to open a webpage is to do not open the second page when the webpage is already opened! (Webpage Tips)

Source: Internet
Author: User

The trick to open a webpage is to do not open the second page when the webpage is already opened!

This trick I met when I was working on a project.

When a user clicks the "add to shopping cart" button in my BtoC shopping cart, the shopping cart page is opened. However, when the shopping cart page is opened, the page is refreshed.

For the original effect, click the following
Click my 2

If I clicked 2, did I open two identical pages?

Now let's look at the new results.

New effect. Click below again
Click my 2

Click 2 to see if only one page is opened

The following is the implementationCodeIn fact, it is quite simple to use the attribute target

<A href = "/aierong/archive/2004/07/04/21150. aspx"Target = "_ blank"> Click my 2 </a>

<A href = "/aierong/archive/2004/07/04/21150. aspx"Target = "aierong"> Click my 2 </a>

This is not quite good. No matter how many times you click the link, the second same page will not be opened when the link page has already been opened.

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.