Click the mouse on the canvas to get the current x,y position within the canvas.
The coordinates will still work after the browser has been resize. Try resizing the browser to test this.
Note that this canvas is 500 by 500 pixels.