B

이거 왜이러는 걸까요 ㅠㅠ

· 13년 전 · 745
Untitled-1 copy.JPG
사이트 주소 : powersnt.com/g4new

사이트 메인에 마우스 오버하면 QR코드가 뜨는 코드를 삽입했는데,
첫페이지에 들어가면 하단에 QR코드가 나옵니다.

해당 코드는
<script>
function createLayer(sId) {
var elDiv = document.getElementById(sId);
if (elDiv == null) {
elDiv = document.createElement("DIV");
document.body.appendChild(elDiv);
elDiv.id = sId;
elDiv.style.position = "absolute";
}
//각 이미지 마다 마우스를 따라다닐 이미지를 배열에 넣음(참고: 이미지 두개만 사용하였음)
//위에서부터 순차적으로 갯수에 맞게 넣어주세요..
var pointers = ["<?=$g4['path']?>/image/mobile_01_1.png"];
var imgObj = document.getElementsByName("imgMain");
for (var i=0; i<imgObj.length; i++){
elDiv.innerHTML += "<img name='pointer' style='display:none' src='"+pointers[i]+"'>";
var pointerImg = document.getElementsByName("pointer");
imgObj[i].onmouseover= (function(_i){
return function(){
viewLayer(elDiv,pointerImg[_i]);
}
})(i);
imgObj[i].onmousemove= function(e){ moveLayer(elDiv, e) };
imgObj[i].onmouseout= (function(_i){
return function(){
hiddenLayer(elDiv,pointerImg[_i]);
}
})(i);
}
viewLayer(elDiv, pointerImg[0]);
}
function viewLayer(sId, img){
sId.style.display = "block";
img.style.display = "block";
}

function moveLayer(sId, e){
var eX, eY;
if(e){
eX = e.clientX;
eY = e.clientY;
}else{
eX = event.x;
eY = event.y;
}
sId.style.top = eY+document.body.scrollTop-10+"px"; //세로좌표
sId.style.left = eX+document.body.scrollLeft+10+"px"; //가로좌표
}

function hiddenLayer(sId, img){
sId.style.display = "none";
img.style.display = "none";
}

window.onload = function(){
createLayer('clickLayer'); //이번 예제도 레이어는 하나만 사용합니다.
}
</script>

<table width="75" height="243" border="0" cellpadding=0 cellspacing=0><tr><td>
<img src="<?=$g4['path']?>/image/mobile_01.gif" width="75" height="42" /></td></tr>
<tr><td>
<img src="<?=$g4['path']?>/image/mobile_02.gif" width="75" height="66" name="imgMain"></td></tr>
<tr><td>
<img src="<?=$g4['path']?>/image/mobile_03.gif" width="75" height="71" /></td></tr>
<tr><td>
<img src="<?=$g4['path']?>/image/mobile_04.gif" width="75" height="74" /></td></tr>
</table>


이거구요..
왜 이러는 걸까요 ㅠㅠㅠㅠㅠㅠ

첨부파일

Untitled-1 copy.JPG (319.7 KB)
0회 2013-01-29 23:43
|
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
13년 전 조회 1,036
13년 전 조회 1,466
13년 전 조회 875
13년 전 조회 826
13년 전 조회 746
13년 전 조회 1,057
13년 전 조회 1,113
13년 전 조회 1,541
13년 전 조회 900
13년 전 조회 746
13년 전 조회 1,015
13년 전 조회 1,555
13년 전 조회 794
13년 전 조회 813
13년 전 조회 952
13년 전 조회 996
13년 전 조회 972
13년 전 조회 1,231
13년 전 조회 762
13년 전 조회 4,473