在等待小程序加载时将光标更改为等待光标
我有一个应用程序,其中首先加载 HTML 页面,然后加载一个包含大量数据的小程序。小程序的加载需要一些时间,并且在小程序加载时,客户希望等待光标的形状为沙漏形状(即使 Sun Java 显示正在执行其通常的操作)。我知道将光标更改为等待光标的 javascript 命令是 document.body.style.cursor = "等待";
但是,如何在小程序开始加载之前将光标更改为等待光标,并在加载完成时将其关闭。
I have an application where an HTML page first loads, then an applet with lots of data loads. It takes some time for the applet to load and while the applet is loading the customer would like an hour glass to be the shape of the wait cursor (even though the Sun Java display is doing its usual thing). I know the javascript command for changing a cursor to a wait cursor is
document.body.style.cursor = "wait";
But how do you change the cursor to the wait cursor right before the applet starts to load and turn it off when it finishes loading.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以放置一个覆盖整个屏幕的 DIV,就像灯箱一样。将光标样式设置为“等待”该元素。由于它覆盖了整个屏幕,因此无论鼠标位置如何,光标都将始终被设置。小程序加载完成后将其隐藏。
You can put up a DIV that covers the entire screen, much like a lightbox. Set the cursor style to "wait" for that element. Since it covers the enture screen, the cursor will always be set, regardless of mouse location. Hide it after your applets are finished loading.