[英]How to disable URL tooltip (status bar)?
When I click on a link (or hover with a mouse), the URL shows up at the bottom of the screen. 当我单击链接(或用鼠标悬停)时,URL会显示在屏幕底部。 That's the default behaviour in Firefox.
这是Firefox中的默认行为。
How can I prevent this ? 我该如何预防呢?
I'm making a website for tactile interfaces. 我正在建立一个用于触觉界面的网站。
Thanks ! 谢谢 !
It would be better if you are using any other tag other than <a>
if suppose you are using a 如果您使用的是
<a>
以外的其他标签,那将更好。
<div id='idofdiv'>
tag <div id='idofdiv'>
标签
the query will be 查询将是
$('#idofdiv').click(function(){
window.open('www.google.com');
});
hope this helps!! 希望这可以帮助!!
you can achieve this using jquery, first inlcude the jquery library in your page then 您可以使用jquery实现此目的,首先在页面中包含jquery库,然后
write the script in the page 在页面中编写脚本
$(function(){
$('[data-url]') //select all elements having data-url
.click(function(e){ e.preventDefault();
window.location.href= $(this).attr('data-url')})
})
and in the html 并在html中
<span data-url="#/inbox" >Go to inbox</span>
<a data-url="mydraft.html">Drafts</a>
Browsers don`t show what object will do onClick, so try this: 浏览器不会显示将执行onClick的对象,因此请尝试以下操作:
<div onclick="location.href ='http://www.google.com';"> click me </div>
Or you can use span which is inline element: 或者您可以使用span,它是嵌入式元素:
<span onclick="location.href ='http://www.google.com';"> click me </span>
This is not possible and CSS is nowhere here, you just cannot do it with CSS, well you can use something like this to spoof the <a>
link but I suggest you don't use all this, without any specific reason, anyways they'll find the URL from the source page 这是不可能的,CSS不在这里,您只是无法使用CSS做到这一点,您可以使用这样的东西来欺骗
<a>
链接,但我建议您不要使用所有这些,除非有任何特定原因,无论如何会从源页面找到该URL
<a href="#" onclick="location.href ='http://www.google.com';">Spoofing</a>
Note: Actually just checked, the demo is not working on the fiddle page but just make a local .html
page and it will work 注意:实际上只是选中了该演示,它无法在小提琴页面上运行,而只是制作一个本地
.html
页面,它将可以正常工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.