YesYo.com MintState Forums
뒤로    YesYo.com MintState BBS > Tech > Javascript
검색
멤버이름    오토
비밀번호 
 

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

페이지 정보

작성자 MintState 댓글 0건 조회 16,731회 작성일 08-11-17 13:37

본문

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

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


<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-->
첨부 파일
파일 종류: jpg rolling.jpg (5.7K, 56 views)

댓글목록

등록된 댓글이 없습니다.

Total 178건 3 페이지
Javascript 목록
번호 제목 글쓴이 조회 날짜
138 MintState 18551 11-17
137
세로롤링 댓글+ 1
MintState 16181 11-17
136 MintState 15248 11-17
135 MintState 14790 11-17
134 MintState 16434 11-17
133 MintState 17338 11-17
132 MintState 17130 11-17
131 MintState 18151 11-17
130 MintState 17069 11-17
129 MintState 14917 11-17
128 MintState 15643 11-17
127 MintState 16434 11-17
열람중 MintState 16732 11-17
125 MintState 20156 11-17
124 MintState 17421 11-17
123 MintState 10877 11-17
122 MintState 16212 11-17
121 MintState 17114 11-17
120 MintState 10013 11-17
119 MintState 10611 11-17
게시물 검색
모바일 버전으로 보기
CopyRight ©2004 - 2024, YesYo.com MintState. ™