자바스크립트 오류인데요^^ 도와주실분^^
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.........
게시글 목록
| 번호 | 제목 |
|---|---|
| 32341 | |
| 32339 | |
| 32326 | |
| 32325 | |
| 32322 | |
| 32319 | |
| 32318 | |
| 32316 | |
| 32315 | |
| 32313 | |
| 32312 | |
| 32311 | |
| 32310 | |
| 32304 | |
| 32303 | |
| 32300 | |
| 32293 | |
| 32292 | |
| 32291 | |
| 32285 | |
| 32284 | |
| 32275 | |
| 32271 | |
| 32268 | |
| 32265 | |
| 32261 | |
| 32258 | |
| 32257 | |
| 32255 | |
| 32254 | |
| 32253 | |
| 32251 | |
| 32250 | |
| 32249 | |
| 32247 | |
| 32246 | |
| 32245 | |
| 32244 | |
| 32243 | |
| 32242 | |
| 32241 | |
| 32240 | |
| 32239 | |
| 32238 | |
| 32237 | |
| 32236 | |
| 32232 | |
| 32229 | |
| 32228 | |
| 32227 | |
| 32217 | |
| 32215 | |
| 32214 | |
| 32213 | |
| 32211 | |
| 32207 | |
| 32196 | |
| 32193 | |
| 32192 | |
| 32190 | |
| 32188 | |
| 32186 | |
| 32184 | |
| 32173 | |
| 32172 | |
| 32171 | |
| 32167 | |
| 32165 | |
| 32163 | |
| 32162 | |
| 32158 | |
| 32157 | |
| 32155 | |
| 32151 | |
| 32149 | |
| 32135 | |
| 32132 | |
| 32127 | |
| 32125 | |
| 32122 | |
| 32120 | |
| 32119 | |
| 32117 | |
| 32116 | |
| 32115 | |
| 32114 | |
| 32112 | |
| 32111 | |
| 32109 | |
| 32107 | |
| 32104 | |
| 32103 | |
| 32102 | |
| 32101 | |
| 32094 | |
| 32089 | |
| 20404 | |
| 31036 | |
| 8279 | |
| 8268 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기