JavaScript

[DOM_Event] JS - pageX 속성 - 가로좌표 (= x좌표 = 페이지엑스속성, IE12)

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>

 

 


분류 제목
DOM_Event JS - inputType -
DOM_Event JS - isComposing -
DOM_Event JS - isTrusted -
DOM_Event JS - key 속성 -
DOM_Event JS - key 속성 -
DOM_Event JS - keyCode 속성 - 눌린 키보드키 유니코드 (= onkeypress, onkeydown, on…
DOM_Event JS - location -
DOM_Event JS - lengthComputable -
DOM_Event JS - loaded -
DOM_Event JS - metaKey -
DOM_Event JS - metaKey -
DOM_Event JS - MovementX -
DOM_Event JS - MovementY -
DOM_Event JS - newValue -
DOM_Event JS - newURL -
49/89
목록
 홈  PC버전 로그인 일본어
그누앞단언어
그누뒷단언어
그외코딩언어
그누보드
제작의뢰
Q&A
커뮤니티
웹유틸
회원센터
홈짱닷컴 PC버전 로그인