사이트 내 전체검색
간단히 이미지와 URL로 롤링되는 소스
로빈아빠
https://cmd.kr/javascript/732 URL이 복사되었습니다.

본문

간단히 이미지와 URL로 롤링되는 소스

매경 파트너사이트 소개에 쓰이는 것입니다.
20e7ce7a_122689661601565

<script>
var aPartnerImg = new Array(); 

var aPartnerLink = new Array(); 

aPartnerImg[0] = "http://img.mk.co.kr/include2006/file/imgPart/par1.gif"; 
aPartnerLink[0] = "http://www.sktelecom.com/main.html"; 
aPartnerImg[1] = "http://img.mk.co.kr/include2006/file/imgPart/par2.gif"; 
aPartnerLink[1] = "http://www.ktf.com/"; 
aPartnerImg[2] = "http://img.mk.co.kr/include2006/file/imgPart/par3.gif"; 
aPartnerLink[2] = "http://www.speedbank.co.kr/"; 

aPartnerImg[3] = "http://img.mk.co.kr/include2006/file/imgPart/par4.gif"; 
aPartnerLink[3] = "http://www.lgtelecom.com/"; 
aPartnerImg[4] = "http://img.mk.co.kr/include2006/file/imgPart/par5.gif"; 
aPartnerLink[4] = "http://www.surenet.co.kr/"; 
aPartnerImg[5] = "http://img.mk.co.kr/include2006/file/imgPart/par6.gif"; 
aPartnerLink[5] = "http://www.hunet.co.kr/"; 

aPartnerImg[6] = "http://img.mk.co.kr/include2006/file/imgPart/par7.gif"; 
aPartnerLink[6] = "http://www.kr.hsbc.com/kr/korean/"; 
aPartnerImg[7] = "http://img.mk.co.kr/include2006/file/imgPart/par8.gif"; 
aPartnerLink[7] = "http://www.gonews.co.kr/"; 
aPartnerImg[8] = "http://img.mk.co.kr/include2006/file/imgPart/par9.gif"; 
aPartnerLink[8] = "http://www.priden.com/"; 

aPartnerImg[9] = "http://img.mk.co.kr/include2006/file/imgPart/par10.gif"; 
aPartnerLink[9] = "http://www.epasskorea.com"; 
aPartnerImg[10] = "http://img.mk.co.kr/include2006/file/imgPart/flyasiana.gif"; 
aPartnerLink[10] = "http://flyasiana.com/main.asp"; 
document.writeln('<table border=0 cellspacing=0 cellpadding=0>');
document.writeln('        <tr> ');
document.writeln('          <td width=90><img src=http://img.mk.co.kr/mk_2006/mp30.gif></td><td width=15></td>');
document.writeln('          <td width=12 onMouseOver="PartnerMouseOver()" onMouseOut="PartnerMouseOut()"><img src=http://img.mk.co.kr/mk_2006/mp28.gif border=0 onClick="prevPartner()" style="cursor:hand"></a></td>');
document.writeln('          <td align=center><table border=0 cellspacing=0 cellpadding=0>');
document.writeln('              <tr>');
document.writeln('                <td onMouseOver="PartnerMouseOver()" onMouseOut="PartnerMouseOut()"><span id=mkMainPartner1></span></td>');
document.writeln('                <td width=5>&nbsp;</td>');
document.writeln('                <td onMouseOver="PartnerMouseOver()" onMouseOut="PartnerMouseOut()"><span id=mkMainPartner2></span></td>');
document.writeln('                <td width=5>&nbsp;</td>');
document.writeln('                <td onMouseOver="PartnerMouseOver()" onMouseOut="PartnerMouseOut()"><span id=mkMainPartner3></span></td>');
document.writeln('              </tr>');
document.writeln('            </table></td>');
document.writeln('          <td width=12 align=right  onMouseOver="PartnerMouseOver()" onMouseOut="PartnerMouseOut()"><img src=http://img.mk.co.kr/mk_2006/mp29.gif border=0 onClick="nextPartner()" style="cursor:hand"></td><td width=33></td>');
document.writeln('        </tr>');
document.writeln('      </table>');




var PartnerTmpVar = aPartnerImg.length % 3;
var PartnerTimeInt =1;
var  PartnerOverChk = false;
var PartnerRTime = 3000;
if(PartnerTmpVar % 3 != 0){
	for(i =0;i < (3 - (PartnerTmpVar % 3)) ; i++)
	{
			aPartnerImg[aPartnerImg.length] = aPartnerImg[i];
			aPartnerLink[aPartnerImg.length] = aPartnerLink[i];		
	}		
}

function PartnerRoll(){
	if(PartnerOverChk == false){
		if(PartnerTimeInt >= aPartnerImg.length){
			PartnerTimeInt = 1;
		}		
		document.getElementById("mkMainPartner1").innerHTML = "<a href="+aPartnerLink[PartnerTimeInt-1]+" target=_new><img src="+aPartnerImg[PartnerTimeInt-1]+" border=0 width=119 height=31></a>";
		PartnerTimeInt++;
		document.getElementById("mkMainPartner2").innerHTML = "<a href="+aPartnerLink[PartnerTimeInt-1]+" target=_new><img src="+aPartnerImg[PartnerTimeInt-1]+"  border=0  width=119 height=31></a>";
		PartnerTimeInt++;
		document.getElementById("mkMainPartner3").innerHTML = "<a href="+aPartnerLink[PartnerTimeInt-1]+" target=_new><img src="+aPartnerImg[PartnerTimeInt-1]+"  border=0  width=119 height=31></a>";	
		PartnerTimeInt++;		
	}
	setTimeout("PartnerRoll()",PartnerRTime);
}
function PartnerMouseOver(){
	 PartnerOverChk = true;
}
function PartnerMouseOut(){
	 PartnerOverChk = false;
}
function nextPartner(){

		if(PartnerTimeInt >= aPartnerImg.length){
			PartnerTimeInt = 1;
		}		
		document.getElementById("mkMainPartner1").innerHTML = "<a href="+aPartnerLink[PartnerTimeInt-1]+" target=_new><img src="+aPartnerImg[PartnerTimeInt-1]+" border=0 width=119 height=31></a>";
		PartnerTimeInt++;
		document.getElementById("mkMainPartner2").innerHTML = "<a href="+aPartnerLink[PartnerTimeInt-1]+" target=_new><img src="+aPartnerImg[PartnerTimeInt-1]+"  border=0  width=119 height=31></a>";
		PartnerTimeInt++;
		document.getElementById("mkMainPartner3").innerHTML = "<a href="+aPartnerLink[PartnerTimeInt-1]+" target=_new><img src="+aPartnerImg[PartnerTimeInt-1]+"  border=0  width=119 height=31></a>";	
		PartnerTimeInt++;
}
function prevPartner(){
		PartnerTimeInt = PartnerTimeInt-6;
		if(PartnerTimeInt < 0 ){
			PartnerTimeInt = aPartnerImg.length-2;
		}		
		document.getElementById("mkMainPartner1").innerHTML = "<a href="+aPartnerLink[PartnerTimeInt-1]+" target=_new><img src="+aPartnerImg[PartnerTimeInt-1]+" border=0 width=119 height=31></a>";
		PartnerTimeInt++;
		document.getElementById("mkMainPartner2").innerHTML = "<a href="+aPartnerLink[PartnerTimeInt-1]+" target=_new><img src="+aPartnerImg[PartnerTimeInt-1]+"  border=0  width=119 height=31></a>";
		PartnerTimeInt++;
		document.getElementById("mkMainPartner3").innerHTML = "<a href="+aPartnerLink[PartnerTimeInt-1]+" target=_new><img src="+aPartnerImg[PartnerTimeInt-1]+"  border=0  width=119 height=31></a>";	
		PartnerTimeInt++;
}
PartnerRoll();
</script>
<!--SCRIPT language=javascript src="inc_comm_Partner.js"></SCRIPT-->

댓글목록

쩡이님의 댓글

profile_image 쩡이 작성일

앗~~ !!
좋은자료 정말 감사해요~~~~~ ^^
근데 혹시 이거 옆으로 한칸씩 천천히 롤링되게 려면 어떻게 해야 하나요??

831 (4/17P)

Search

Copyright © Cmd 명령어 18.190.219.178