You cannot ... but you can - in some way.
What you can do to imitate this behavior is that you can hide the actual cursor with css cursor: none , and then create an image representing the cursor that will look the same and will be placed at the position of the real cursor. Then the user will move the mouse, you will need to update the position of the cursor image and apply your random position changes as you wish, although keep in mind that when the user scrolls outside the browser content window (on the controls or outside the browser), they will return the mouse cursor is in the actual position and your cursor will be stuck in the last position.
The only way to get this joke out. Good luck with this and hope they enjoy it;)
PS.
inverting mouse direction can be funny:>
Tom tu
source share