如何隐藏在浏览器的状态栏的链接,当你将鼠标放置上的网页链接? [英] How to hide links on browser'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.
最好的例子就是在这个网站,当你将鼠标放置在本网站上了票链接,它不会显示该链接,点击后的选票增加而无需刷新页面。
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.
感谢
推荐答案
在堆栈溢出,看不到一个地址,因为它不是一个链接(即它不是一个锚)。这是一个跨度,图像或其他元素,有一个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.
因此,例如...
So, for example...
[Html]
<img id="clickme" src="myimage.png" alt="My Image" title="Vote">
[JavaScript (jQuery)]
$("#clickme").click(function() { alert("You clicked me"); });
这篇关于如何隐藏在浏览器的状态栏的链接,当你将鼠标放置上的网页链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!