简体   繁体   中英

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. That's the default behaviour in 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

<div id='idofdiv'> tag

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

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

<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:

<div onclick="location.href ='http://www.google.com';"> click me </div>

Or you can use span which is inline element:

<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

<a href="#" onclick="location.href ='http://www.google.com';">Spoofing</a>

Demo

Note: Actually just checked, the demo is not working on the fiddle page but just make a local .html page and it will work

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM