IT 자료
마우스 포인트 좌표 구하기
성곤
2015. 3. 3. 11:26
반응형
html 마우스 포인트 좌표 구하기
jquery 제이쿼리 이용하기<<
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(document).mousemove(function(event){
$("span").text("X: " + event.pageX + ", Y: " + event.pageY);
});
});
</script>
</head>
<body>
<p>The mouse pointer position is at: <span></span></p>
</body>
</html>
반응형