鼠标悬停时如何将url隐藏在超链接中 [英] how can url be hidden in hyperlink when mouse hover
本文介绍了鼠标悬停时如何将url隐藏在超链接中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当鼠标悬停在超链接上时,如何隐藏显示的 URL?
How can I hide URL from displaying when mouse hovers on a hyperlink?
<a href="url">Hyperlink</a>
如何在鼠标悬停时隐藏浏览器底部状态栏中显示的 URL?
How can I hide URL from displaying in browser's bottom status bar when mouse hovers?
推荐答案
不要把 URL 放在 href
中(或者保留它 href="#"
)并将 JavaScript 函数附加到 onclick
事件,该事件将实际链接放在 a
元素中.这样,当您将鼠标悬停在链接上时,您将看不到实际的 URL,但会在用户实际点击时插入该链接.
Don't put the URL in the href
(or keep it href="#"
) and attach a JavaScript function to the onclick
event which puts the actual link in the a
element. This way you won't see the actual URL when hovering over the link but the link will be inserted when the user actually clicks.
这篇关于鼠标悬停时如何将url隐藏在超链接中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文