Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The code as follows:

function update(e) {

getmousexy(e);

document.getElementById('showXY').value = 'x: ' + mousex + ' ' + 'y: ' + mousey

}

function init() {

document.onmousemove = update;

update();

}


What I have tried:

I have tried to look for information on internet but there is no explanation about this.
Posted
Comments
Richard MacCutchan 10-May-21 7:59am    
Did you write that code?
Member 15627495 13-Jun-22 17:13pm    
Hello !

add in update() { console.log(e); }

can you show :

function getmousexy(e) please.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900