Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var getMouseXY = function(){
- names = [
- 'clientX','clientY',
- 'offsetX','offsetY',
- 'screenX','screenY',
- 'x', 'y'
- ];
- for(var x=0; x<names.length; x++){
- name = names[x];
- domRef = document.getElementById(name);
- domRef.innerHTML = window.event[name];
- }
- }
- window.onload=function(){
- document.body.onmousemove=getMouseXY;
- }
Add Comment
Please, Sign In to add comment