使用任意方法(插件、GreaseMonkey?)在 Chrome 或 Firefox 中使用 JavaScript 移动鼠标光标

发布于 2024-08-24 15:18:08 字数 132 浏览 1 评论 0原文

我需要在浏览器中移动鼠标光标位置,我可以使用任何方法,只要它在 Google Chrome 或 Firefox 中,其中之一即可。 在最好的情况下,我想用javascript控制鼠标位置。

有什么简单的方法可以做到这一点吗?谢谢!菲尔

I have need to move the mouse cursor position in the browser, I can use any method as long as its in Google Chrome or Firefox, one or the other.
In the best case, I would like to control the mouse position with javascript.

Any easy way to do this? Thanks! Phil

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

浅浅淡淡 2024-08-31 15:18:08

我认为这是不可能的。尽管 Greasemonkey 提供了一些附加功能(例如跨服务器 XMLHttpRequests),但我认为这还没有实现。

也许您正在寻找可用于 Firefox 扩展的功能。但我不确定。

也许您可以模仿 LMGTFY 中的这种行为。我想你可以用 CSS 隐藏鼠标。

编辑:我使用 bit.ly 和 LMGTFY 来证明我的观点。问题是关于隐藏鼠标。 各位,请在投票和编辑之前阅读!

I don't think this is possible. Altough Greasemonkey gives some additional features (like Cross-Server XMLHttpRequests), I don't think this has been implemented.

Perhaps what you are looking for is a feature available for Firefox extensions. But I'm not sure.

Maybe you can emulate this behaviour as in LMGTFY. You can hide the mouse with CSS, I think.

Edit: I'm using both bit.ly and LMGTFY to stand my point. The question is about hiding a mouse. Please read before voting and editing, people!

家住魔仙堡 2024-08-31 15:18:08

从特权 Firefox (JS) 代码中,您可以调用 nsIDOMWindowUtils.sendNativeMouseEvent(x, y, 0, 0, null) 重新定位鼠标光标,其中 (x,y) 是绝对屏幕坐标。请参阅https://stackoverflow.com/a/39324799/1288130

From privileged Firefox (JS) code you can call nsIDOMWindowUtils.sendNativeMouseEvent(x, y, 0, 0, null) to reposition the mouse cursor, where (x,y) is an absolute screen coordinate. See https://stackoverflow.com/a/39324799/1288130

瘫痪情歌 2024-08-31 15:18:08

试试这个:您可以创建自己的 COM 对象,该对象将在客户端

http: 上注册//febru.soluvas.com/2015/02/javascript-move-mouse.html

try this :you can create your own COM object that will registered on client

http://febru.soluvas.com/2015/02/javascript-move-mouse.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文