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!