Get Mouse Position in javascript - Where is the mouse
From Code Trash
எங்கே எலி ?
தேடினேன் வந்தது
சீ தி பிலோவ் ...
function whereIsMouse(e) { var posx = 0; var posy = 0; if (!e) var e = window.event; if (e.pageX || e.pageY) { posx = e.pageX; posy = e.pageY; } else if (e.clientX || e.clientY) { posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; } return {'x': posx, 'y':posy}; }