window.onload = function () { document.onclick = function (e) { alert("X的坐标是:" + e.pageX+"\ny的坐标是:"+e.pageY); } }