pageX 예제
<h2 onclick="homzzang(event)">홈짱닷컴 Homzzang.com</h2> <p id="demo"></p> <script> function homzzang(event) { var x = event.pageX; var y = event.pageY; var coords = "X coords: " + x + ", Y coords: " + y; document.getElementById("demo").innerHTML = coords; } </script>
<h2 onclick="homzzang(event)">홈짱닷컴 Homzzang.com</h2>
<p id="demo"></p>
<script>
function homzzang(event) {
var x = event.pageX;
var y = event.pageY;
var coords = "X coords: " + x + ", Y coords: " + y;
document.getElementById("demo").innerHTML = coords;
}
</script>