I often debug my javascript code using the Chrome web debugger. In the elements tab, hovering over an element show a tooltip with a few pieces of information, including the widt
You could type this into the console,
document.onmousemove = function(e){ var x = e.pageX; var y = e.pageY; e.target.title = "X is "+x+" and Y is "+y; };
This will give you mouse position on mouse move in the element tooltip.