JavaScript - How to stop mouse movement

前端 未结 3 512
南旧
南旧 2021-01-23 05:56

No jQuery possible.

How to disable / stop mouse movement with JavaScript?

What to do: If the mouse is being moved to, let\'s say,

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-23 06:44

    You cannot do this with JavaScript and I dare say you never will be able to.

    If you need to do this for some kind of game element, for example, I recommend that you place a page-element under the mouse and prevent the page-element from moving outside of the bounds even if the mouse does.

提交回复
热议问题