如何在 Firefox 和 Chrome 中查看/设置瞬时消息状态栏?
我向 HTML 文档添加了一条新的临时状态栏消息(特别是表中列出的 5 个链接,请参阅下面的代码),它在 IE 中运行良好,但当我在 Firefox 或 Chrome 中查看该文档时,该消息没有出现。我看到的只是 URL 链接。有人可以告诉我如何让瞬时状态栏消息在 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>
I added a new transient status bar message to my HTML document (specifically the 5 links listed in the table, see code below) and it worked fine in IE but when I viewed the document in Firefox or Chrome the message did not appear. All that I saw was the URL link. Can someone show me how I can get the transient status bar message to show in both Firefox and Chrome?
Here is my code:
<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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
抱歉,如果没有 无法完成用户更改浏览器设置:
这是针对 Firefox 的,我想在 Chrome 中也是一样的。更改状态栏被认为是一种安全风险,并且将越来越不受支持。考虑使用
title
属性来对链接进行详细说明:当用户将鼠标悬停在链接上时,它将出现在工具提示中。
Sorry, can't be done without the user changing a browser setting:
This is for Firefox, I assume it's the same in Chrome. Changing the status bar is considered a risk security-wise, and will be less and less supported. Consider using a
title
attribute for a verbose explanation of the link:it will appear in a tooltip when the user hovers with the mouse over the link.