2010-02-17 54 views
0

我向我的HTML文檔(特別是表中列出的5個鏈接,見下面的代碼)添加了一個新的瞬態狀態欄消息,並且它在IE中運行正常,但是當我在Firefox或Chrome中查看文檔時,消息沒有出現。我看到的只是URL鏈接。有人能告訴我如何讓Firefox和Chrome瀏覽器顯示暫時狀態欄消息嗎?如何查看/設置Firefox和Chrome中的瞬態消息狀態欄?

這裏是我的代碼:

<table> 
<tr><td colspan="5"><img src="logo.gif" alt="The Civil War Journal" /></td></tr> 
<tr><td> 
    <a href="cwj.htm" class="Links" 
     onmouseover = "window.status='Go to the Home Page'; return true" 
     onmouseout = "window.status=''; return true">Home Page</a> 
</td> 
<td> 
    <a href="#" class="Links" 
     onmouseover = "window.status='View Current Events'; return true" 
     onmouseout = "window.status=''; return true">News</a> 
</td> 
<td> 
    <a href="#" class="Links" 
     onmouseover = "window.status='Go to Feature Articles'; return true" 
     onmouseout = "window.status=''; return true">Features</a> 
</td> 
<td> 
    <a href="#" class="Links" 
     onmouseover = "window.status='Go to the Civil War Form'; return true" 
     onmouseout ="window.status=''; return true">Forum</a> 
</td> 
<td> 
    <a href="form.htm" class="Links" 
     onmouseover = "window.status='Subscribe Today!'; return true" 
     onmouseout = "window.status=''; return true">Subscriptions</a> 
</td></tr></table> 

回答

1

對不起,can't be done無需用戶改變瀏覽器設置:

此屬性不會在Firefox的默認配置和一些其他瀏覽器:設置窗口.status對狀態欄中顯示的文本沒有影響。要允許腳本更改狀態欄文本,用戶必須在about:config屏幕中將dom.disable_window_status_change首選項設置爲false。

這是用於Firefox的,我認爲它在Chrome中是一樣的。更改狀態欄在安全性方面被認爲是一種風險,並且支持越來越少。考慮使用title屬性爲鏈接的詳細解釋:

<a href="cwj.htm" class="Link" title="Go to the Home Page"> 

當用戶用鼠標在鏈接上懸停它會出現在工具提示中。