开发者

Hide link URL with JavaScript

How do I hide a URL? The URL is a mouse over an image. I want to hide the URL for the image when the us开发者_高级运维er mouse over the image. Right now when I mouse over the image, I can clearly see the URL on the status bar, not the location bar.

echo'<a href="images/myImage-'.$i.'.jpg?day='.$i.'" onclick="swap(this); change(this); return false;">';
echo'<img src="images/myThum-'.$i.'.jpg" width="50" height="50"/&gt;</a> ';


The browser shows the URL of hovered links as a security feature. Why would you want to disable that? Well, if you really wanted to, you could replace the "a" tag with pure Javascript to deal with clicks on the image. Of course then things won't work for people with Javascript turned off.


As per http://www.plus2net.com/javascript_tutorial/status-msg.php :

<a href="http://stackoverflow.com/" onMouseOver="window.status='Welcome to Stackoverflow'; return true" onMouseOut="window.status='Questions and Answers'; return true">Visit StackOverflow</a>

Many people, however, have disabled status changes. The url above continues on to say...

If your FireFox browser is not showing the changes in the status bar then you have to change the settings. Type about:config at address bar of FireFox. Search for dom.disable_window_status_change. It should be set to false, if it is true then click it to change ( toggle ) the value to False.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜