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="myimage.png" alt="My Image" title="Vote">
[JavaScript (jQuery)]
$("#clickme").click(function() { alert("You clicked me"); });
这篇关于鼠标悬停在网页上的链接上时如何隐藏浏览器状态栏上的链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:鼠标悬停在网页上的链接上时如何隐藏浏览器状态栏上的链接?


基础教程推荐
- php中的foreach复选框POST 2021-01-01
- 使用 scandir() 在目录中查找文件夹 (PHP) 2022-01-01
- php 7.4 在写入变量中的 Twig 问题 2022-01-01
- 如何在数学上评估像“2-1"这样的字符串?产生“1"? 2022-01-01
- PHPUnit 的 Selenium 2 文档到底在哪里? 2022-01-01
- php中的PDF导出 2022-01-01
- Yii2 - 在运行时设置邮件传输参数 2022-01-01
- Web 服务器如何处理请求? 2021-01-01
- 主题化 Drupal 7 的 Ubercart “/cart"页 2021-01-01
- 将变量从树枝传递给 js 2022-01-01