Linked Property href= "? ” ? What and what are the pros and cons

Source: Internet
Author: User
  1. <a onclick= "{jscode}" > is a very common way of JS use, often add a href= "# # #" That is <a onclick= "{jscode}" href= "# # #" >without <a href= "Javascript:{jscode}" > or <a href= "javascript:" > is to be compatible with multiple browsers to <a > Label interpretation and Handling.
  2. <a href= "#" >#是有特定意义的, if there is content behind the #, it will be considered a label, the corresponding tag will be found when clicked, and will jump to the first page when it is not found. The page is not refreshed.
  3. # # # #其实是 # and # #的组合, is a meaningless label, just a habit of writing, the principle "relies on the Web page error mechanism, can not be found to do not do".
  4. <a href= "" > will re-refresh the page, back to the top of the page.

Linked Property href= "? ” ? What and what are the pros and cons

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.