問題描述
我在我的項目中使用 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"); });
這篇關于鼠標懸停在網頁上的鏈接上時如何隱藏瀏覽器狀態欄上的鏈接?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!