ドキュメント全体の相対的なイベント発生場所の水平位置を返します。 文法 var pageX = event.pageX; pageX変数には、マウスイベント発火時の水平位置のピクセル数値が格納されます。 この値はドキュメント全体からの相対位置になります。 このプロパティは、ページの水平スクロールを考慮します。 例 <html> <head> <title>pageX\pageY & layerX\layerY example</title> <style type="text/css"> body { font-size: 12px; } #d1 { border: solid blue 1px; padding: 20px; } #d2 { position: absolute; top: 180px; left: 80%; right:auto; width: 40%; border: