Firefox 4 取消了状态栏。我曾经window.status
向我的网络应用程序的用户显示一些信息性消息。我可以使用 FF4 中内置的其他可比功能吗?如果显示这些消息需要附加组件,那么您可以打赌 90% 的用户不会看到它们。
3 回答
状态消息劫持是一种正在逐渐消失的不良做法。我认为这个浏览器中 javascript 的默认行为是不让劫持它。
解决方法:另找方法。工具提示,创建自己的状态栏,使用title
属性等。不要依赖状态栏之类的东西。
使用或依赖状态消息是否是“坏习惯”是值得商榷的。如果您正在设计一个面向工作的桌面应用程序,那么它们如何在手机上呈现是没有意义的。一种设备的良好做法可能不适合其他设备。如果您迎合最低的通用设备功能,那么您将无法利用功能更强大的设备的优势。我想说状态消息的实用性取决于应用程序的使用和类型。
Not everyone HAS the status bar turned on or even a title bar. (Consider phones and tablets that do away with these things just to increase a little screen real estate.) Also with more and more touchscreen devices entering the fray, mouseover is also going to become less useful.
Do consider alternatives. Also remember, hiding information from the user until they click or hover the right spot in a deadly sin of GUI design.