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"); });
这篇关于鼠标悬停在网页上的链接上时如何隐藏浏览器状态栏上的链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:鼠标悬停在网页上的链接上时如何隐藏浏览器状态栏上的链接?


基础教程推荐
- HTTP 与 FTP 上传 2021-01-01
- 如何在 Symfony 和 Doctrine 中实现多对多和一对多? 2022-01-01
- 如何在 XAMPP 上启用 mysqli? 2021-01-01
- 使用 PDO 转义列名 2021-01-01
- PHP 守护进程/worker 环境 2022-01-01
- 在 yii2 中迁移时出现异常“找不到驱动程序" 2022-01-01
- phpmyadmin 错误“#1062 - 密钥 1 的重复条目‘1’" 2022-01-01
- 在 CakePHP 2.0 中使用 Html Helper 时未定义的变量 2021-01-01
- Doctrine 2 - 在多对多关系中记录更改 2022-01-01
- 找不到类“AppHttpControllersDB",我也无法使用新模型 2022-01-01