자바스크립트 오류인데요^^ 도와주실분^^
function moveLayer(strlayer,width,height,evt) {
var theObj;
if (navigator.appName == 'Netscape' && document.layers != null)
theObj = eval("document.layers['" + strlayer + "']");
else if (document.all != null) //IE
theObj = eval("document.all['" + strlayer + "'].style");
var windowWidth = document.body.scrollWidth;
if(theObj) {
if (windowWidth<1180){
theObj.pixelLeft = evt.x+5-200;
theObj.pixelTop = evt.y+5+document.body.scrollTop;
}else{
theObj.pixelLeft = evt.x+5-200;
theObj.pixelTop = evt.y+5+document.body.scrollTop;
}
}
}
>>
theObj = eval("document.all['" + strlayer + "'].style");
여기 코드에서 에러나오느데요 스타일을 못찾는다고 하네욤~~ 스타일을 지워도 안되서 올려보와욤^^
도와주실분^^
var theObj;
if (navigator.appName == 'Netscape' && document.layers != null)
theObj = eval("document.layers['" + strlayer + "']");
else if (document.all != null) //IE
theObj = eval("document.all['" + strlayer + "'].style");
var windowWidth = document.body.scrollWidth;
if(theObj) {
if (windowWidth<1180){
theObj.pixelLeft = evt.x+5-200;
theObj.pixelTop = evt.y+5+document.body.scrollTop;
}else{
theObj.pixelLeft = evt.x+5-200;
theObj.pixelTop = evt.y+5+document.body.scrollTop;
}
}
}
>>
theObj = eval("document.all['" + strlayer + "'].style");
여기 코드에서 에러나오느데요 스타일을 못찾는다고 하네욤~~ 스타일을 지워도 안되서 올려보와욤^^
도와주실분^^
댓글 1개
sjsjin
13년 전
위 코드를 왜 eval 로 처리하는지 모르겠군요. 불필요한데..
if(document.getElementById)
theObs = document.getElementById(strlayer); // DOM
else if (document.layers)
theObj = document.layers[strlayer]; // NN
else if (document.alll) // IE < IE7, 스트릿모드 생략
theObj = document.all[strlayer];
// 스타일처리시
theObj.style.........
if(document.getElementById)
theObs = document.getElementById(strlayer); // DOM
else if (document.layers)
theObj = document.layers[strlayer]; // NN
else if (document.alll) // IE < IE7, 스트릿모드 생략
theObj = document.all[strlayer];
// 스타일처리시
theObj.style.........
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 30 |
아우겐나이스
|
21년 전 | 4064 | |
| 29 |
아우겐나이스
|
21년 전 | 4448 | |
| 28 |
아우겐나이스
|
21년 전 | 3474 | |
| 27 | 21년 전 | 5847 | ||
| 26 | 21년 전 | 3132 | ||
| 25 | 21년 전 | 6097 | ||
| 24 | 18년 전 | 3662 | ||
| 23 | 21년 전 | 3650 | ||
| 22 | 21년 전 | 4254 | ||
| 21 | 21년 전 | 3826 | ||
| 20 | 21년 전 | 4242 | ||
| 19 | 21년 전 | 6695 | ||
| 18 | 21년 전 | 4743 | ||
| 17 | 21년 전 | 7002 | ||
| 16 | 21년 전 | 4183 | ||
| 15 | 21년 전 | 2654 | ||
| 14 | 21년 전 | 4985 | ||
| 13 | 21년 전 | 3408 | ||
| 12 |
Recluse
|
21년 전 | 3894 | |
| 11 |
아우겐나이스
|
21년 전 | 3581 | |
| 10 |
Recluse
|
21년 전 | 3405 | |
| 9 | 21년 전 | 4015 | ||
| 8 | 21년 전 | 5187 | ||
| 7 | 21년 전 | 4774 | ||
| 6 | 21년 전 | 5702 | ||
| 5 | 21년 전 | 4126 | ||
| 4 | 21년 전 | 4858 | ||
| 3 | 21년 전 | 4758 | ||
| 2 | 21년 전 | 3259 | ||
| 1 | 22년 전 | 4348 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기