How to make an anchor tag refer to nothing?

后端 未结 18 1478
一向
一向 2020-12-12 10:28

I use jQuery, I need to make some anchor tags perform no action.

I usually write it like this:

link

H

18条回答
  •  醉梦人生
    2020-12-12 10:39

    You can have an HTML anchor (a tag) without an href attribute. Leave off the href attribute & it won't link to anything:

    link
    

提交回复
热议问题