레이어 좌표 값 뽑기 스크립트
<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;
}
<!--
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>
</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개
solsu1
14년 전
욕시.. ㅋㅋ
14년 전
잘 활용할께요
14년 전
감사 합니다
아이디 클래스명 내용값등을 추출할려면 요?
아이디 클래스명 내용값등을 추출할려면 요?
게시판 목록
그누4 팁자료실
그누보드4와 관련된 팁을 여러분들과 함께 공유하세요.
나누면 즐거움이 커집니다.
나누면 즐거움이 커집니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3309 | 3년 전 | 1807 | ||
| 3308 | 11년 전 | 2093 | ||
| 3307 |
uPAmJ903
|
6년 전 | 4753 | |
| 3306 |
바른사나이
|
6년 전 | 3274 | |
| 3305 | 6년 전 | 12312 | ||
| 3304 | 7년 전 | 3705 | ||
| 3303 | 7년 전 | 3745 | ||
| 3302 |
지리산초보
|
7년 전 | 13597 | |
| 3301 |
sozet
|
8년 전 | 4905 | |
| 3300 |
sozet
|
8년 전 | 5974 | |
| 3299 |
sozet
|
8년 전 | 10863 | |
| 3298 | 8년 전 | 4017 | ||
| 3297 |
또치하우스
|
8년 전 | 4444 | |
| 3296 | 8년 전 | 11972 | ||
| 3295 |
또치하우스
|
8년 전 | 14988 | |
| 3294 | 8년 전 | 6028 | ||
| 3293 | 8년 전 | 5593 | ||
| 3292 |
|
9년 전 | 5320 | |
| 3291 | 9년 전 | 13683 | ||
| 3290 | 9년 전 | 5055 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기