돌아온헌이

레이어 좌표 값 뽑기 스크립트

<SCRIPT LANGUAGE="JavaScript">
<!--
function moveEl(e) {
SRCEL.innerText = event.srcElement;
SRCET.innerText = event.srcElement.tagName;
PAREL.innerText = event.srcElement.parentElement;
PARET.innerText = event.srcElement.parentElement.tagName;
CLXEL.innerText = event.clientX;
CLYEL.innerText = event.clientY;
SCLEL.innerText = document.body.scrollLeft;
SCTEL.innerText = document.body.scrollTop;
OFLEL.innerText = event.srcElement.offsetLeft;
OFTEL.innerText = event.srcElement.offsetTop;
PXLEL.innerText = event.srcElement.style.pixelLeft;
PXTEL.innerText = event.srcElement.style.pixelTop;
}
document.onmousemove = moveEl;
//-->
</SCRIPT>
srcElement: <B ID="SRCEL"></B><BR>
srcElement.tagName: <B ID="SRCET"></B><BR>
srcElement.parentElement: <B ID="PAREL"></B><BR>
srcElement.parentElement.tagName: <B ID="PARET"></B><BR>
srcElement.offsetLeft: <B ID="OFLEL"></B><BR>
srcElement.offsetTop: <B ID="OFTEL"></B><BR>
srcElement.style.pixelLeft: <B ID="PXLEL"></B><BR>
srcElement.style.pixelTop: <B ID="PXTEL"></B><BR>
clientX: <B ID="CLXEL"></B><BR>
clientY: <B ID="CLYEL"></B><BR>
document.body.scrollLeft: <B ID="SCLEL"></B><BR>
document.body.scrollTop: <B ID="SCTEL"></B><BR>
 
좌표값을 이용해 컨트룰 할수 있을것 같아서 올립니다 도움 되시길.....
|

댓글 3개

잘 활용할께요
감사 합니다
아이디 클래스명 내용값등을 추출할려면 요?
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
14년 전 조회 4,667
14년 전 조회 8,723
14년 전 조회 4,826
14년 전 조회 7,829
14년 전 조회 7,930
14년 전 조회 6,055
14년 전 조회 7,699
14년 전 조회 5,205
14년 전 조회 5,040
14년 전 조회 3,958
14년 전 조회 5,873
14년 전 조회 1.6만
14년 전 조회 9,435
14년 전 조회 4,192
14년 전 조회 8,419
14년 전 조회 5,093
14년 전 조회 7,724
14년 전 조회 7,723
14년 전 조회 6,773
14년 전 조회 1.1만
🐛 버그신고