当鼠标悬停时,url如何隐藏在超链接中 [英] how can url be hidden in hyperlink when mouse hover
本文介绍了当鼠标悬停时,url如何隐藏在超链接中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当鼠标悬停在超链接上时,如何隐藏URL显示?
< a href =url>超链接< / a>
鼠标悬停时,如何隐藏网址在浏览器底部的状态栏中显示?
解决方案
不要将URL放在 href
中(或保留 href =#
)并将JavaScript函数附加到 onclick
事件中,该事件将实际链接置于一个
元素。这样,当鼠标悬停在链接上时,您将看不到实际的网址,但当用户实际点击链接时,链接将被插入。
How can I hide URL from displaying when mouse hovers on a hyperlink?
<a href="url">Hyperlink</a>
How can I hide URL from displaying in browser's bottom status bar when mouse hovers?
解决方案
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屋!
查看全文