How to hide links on browser#39;s statusbar when you mouseover on links on webpage?(鼠标悬停在网页上的链接上时如何隐藏浏览器状态栏上的链接?)
问题描述
我在我的项目中使用 Zend、PHP、AJAX、JQuery.问题是,当我将鼠标悬停在网页上的链接上时,如何强制不在浏览器的状态栏上显示链接.
I am using Zend, PHP, AJAX, JQuery in my projects. Question is that how can I force to not display a link on browser's statusbar when I mouseover on a link on my webpage.
最好的例子是在这个网站上,当你将鼠标悬停在这个网站上的up-vote链接上时,它不显示该链接,点击后投票增加而不刷新页面.
Best example is on this site, when you mouseover the up-vote link on this site, it does not show the link and after click the votes increased without refreshing the page.
谢谢
推荐答案
在 Stack Overflow 上,您看不到地址,因为它不是链接(即它不是锚点).它是一个跨度、图像或其他元素,带有一个 onclick 事件处理程序.
On Stack Overflow, you don't see an address, because it isn't a link (i.e. it isn't an anchor). It is a span, image or other element, with an onclick event handler.
这是确保所有浏览器中都没有状态栏文本的唯一方法,就像设置 window.status = "" 的老式 JavaScript 方法一样;目前在大多数浏览器中都没有效果.
This is the only way to guarantee no status-bar text in all browsers as the old-school JavaScript method of setting window.status = ""; has no effect in most browsers these days.
例如……
[Html]
<img id="clickme" src="bXlpbWFnZS5wbmc=" alt="TXkgSW1hZ2U=" title="Vm90ZQ==">
[JavaScript (jQuery)]
$("#clickme").click(function() { alert("You clicked me"); });
这篇关于鼠标悬停在网页上的链接上时如何隐藏浏览器状态栏上的链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:鼠标悬停在网页上的链接上时如何隐藏浏览器状态栏上的链接?
![](/xwassets/images/pre.png)
![](/xwassets/images/next.png)
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- PHP - if 语句中的倒序 2021-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01