更改另一个窗口的鼠标指针 [英] changing mouse pointer for another window

查看:111
本文介绍了更改另一个窗口的鼠标指针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

document.body.style.cursor  = " crosshair" ;


我正在使用它来更改鼠标光标,但是直到我聚焦到其他窗口时,鼠标光标才会更改.

请建议我.


I''m using this for changing mouse cursor but Mouse Cursor does not change, until I Focus To Different Window.

Please suggest me.

推荐答案

我看到的是您正在尝试更改页面正文的指针样式:"document.body.style.cursor"

现在,如果某个页面有更改,而您已经在该页面上,则要进行更改,您将需要一些事件或触发器-窗口更改是一种事件,浏览器可以应用您所做的更改.
您不能期望自动将其立即更改.
What I see is you are trying to change the pointer style of page body: "document.body.style.cursor"

Now, if there is a change for a page and you already are on that page, in order to bring the change you would need some event or trigger - window change is a kind of event where browser can apply the change made by you.
You cannot expect to have this as immediate change automatically.


这篇关于更改另一个窗口的鼠标指针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆