Thanks for the tip, but don't you think that your example doesn't show the case you mentioned - passing this to an anonymous function. Your code works without anon. function:
document.getElementById('block').innerHTML = (e.pageX-this.offsetLeft)+','+(e.pageY-this.offsetTop);
Thanks for the tip, but don't you think that your example doesn't show the case you mentioned - passing this to an anonymous function.
Your code works without anon. function:
document.getElementById('block').innerHTML = (e.pageX-this.offsetLeft)+','+(e.pageY-this.offsetTop);