在网站中使用等待光标好吗?
在网站中使用等待光标好吗?在负载较重的页面上,我通常不会看到它与网站一起使用。 (如果你见过的话,请分享一些。)
如果我实现下面的代码,它会兼容当前的浏览器吗?
function doHourglass()
{
document.body.style.cursor = 'wait';
}
和
<form runat="server" onsubmit="return setHourglass();">
Is it good to use Wait cursor in websites? On heavy loading pages I don't generally see it used with websites. (please share some if you have seen any.)
If I implement the below code, will it be compatible with the current browsers?
function doHourglass()
{
document.body.style.cursor = 'wait';
}
and
<form runat="server" onsubmit="return setHourglass();">
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
等待光标会令人困惑,因为通常它与操作系统相关,我更喜欢在您自己的网页中使用某种“立即加载”(广泛使用)
Wait cursor will be confusing since usually it's OS-related, I'd prefer to have some kind of "loading now" in your own web page (which is widely used)
等待光标可能被认为与浏览器相关,而不是具体与网站相关 - 我会推荐特定于网页的动画。
The wait cursor may be perceived as related to the browser rather than the website specifically - I would recommend an animation specific to the web page.
根据我的经验,网站中的“等待光标”就是小 AJAX 漩涡。
The "wait cursor" in a website is, in my experience, the little AJAX swirly.
如果您使用操作系统的默认“等待”光标,那么它可能会让用户误以为他们正在等待硬件完成操作而不是网页。
如果您不希望用户在等待脚本处理时提交表单两次,那么您可以修改 JavaScript 函数以禁用单击时的提交按钮,或者向包含常用动画圆圈图标的页面添加一个以及与用户沟通的加载消息。
If you use the operating system's default "wait" cursor then it may confuse the user into thinking they're waiting for their hardware to finish an operation rather than the web page.
If you don't want a user to submit a form twice whilst waiting for a script to process, then you could modify your JavaScript function to either disable the submit button on click, or add a to your page containing the often used animated circle icon and a loading message to communicate to the user.
我一直使用光标样式来显示某些操作可用的位置/时间。
用户熟悉等待光标,因此请随意在您的(网络)应用程序中使用它。
它与“所有主要浏览器”兼容,如 CSS2 - 中所述光标样式
I use cursor styles all the time to show where/when certain actions are available.
Users are familiar with the wait cursor, so feel free to use it in your (web)application.
It is compatible with "all major browsers" as explained in CSS2 - Cursor Styles