Application of tag a in actual work, and actual application of tag

Source: Internet
Author: User

Application of tag a in actual work, and actual application of tag

When learning, our cognition of tag:

1. Add an address to the href attribute to redirect the page.

 

2, with the anchor, make the page Jump and cross page Jump (before you have written an article about the anchor: http://www.cnblogs.com/qiujianmei/p/7111600.html)

3. Use pseudo classes: hover, visited, and other buttons to create special effects

 

The following is my current work experience and practical application of tag:

1. Use the tag instead of the input-button tag to simulate the button. Because the tag comes with a small-handed special effect, if the button needs to jump to the page, you can directly use the href attribute of the tag, the j control button is required to send the request.

 

2. The href attribute of the mobile terminal a tag can be used to call the specified phone number by clicking the button: <a href = "tel: 4001001001"> call the hotline </a>

Using this method directly, some mobile browsers may encounter compatibility bugs, such as special characters before the phone number;

Robust Syntax: <a href = "javascript: window. location. href = 'tel: 4001001001 ';"> hotline </a>

 

3. Use tag a to add tracking points to some functional buttons for backend data collection. Tag a is a common method for collecting buried points.

What is tracking, refer to this article: https://sensorsdata.cn/blog/shu-ju-jie-ru-yu-mai-dian/

 

Some new discoveries will be further summarized in this article. You are welcome to give your suggestions and share them with us to make progress!

 

 

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.