我如何建立一个不会在哪里的链接 [英] How do I make a link that goes no where
本文介绍了我如何建立一个不会在哪里的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有可能建立一个什么都不做的链接。我希望项目成为一个链接,以便鼠标悬停时更改光标,但我不希望链接实际到达任何位置,因为它实际上触发了在同一页面上显示具有额外功能的div。
解决方案
将添加到浏览器历史记录中:
< a href =#>< / a>
不会添加到浏览器历史记录(首选方法):
< a href =javascript:;>< / a>
Is it possible to make a link that does nothing. I want the item to be a link so I get the cursor to change on mouseover, but I don't want the link to actually go anywhere as it actually triggers the showing of a div with extra functionality on the same page.
解决方案
Will add to the browser history:
<a href="#"></a>
Won't add to the browser history (preferred method):
<a href="javascript:;"></a>
这篇关于我如何建立一个不会在哪里的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文