일정시간동안 이미지 자동으로 변경하기

<script language="JavaScript" type="text/javascript">
<!--
// 이미지 경로
var imgLeft = new Array() ;
var imgRight = new Array() ;
imgLeft[0] = new Image() ;
imgLeft[0].src = "./img/ex_a1.gif" ;
imgLeft[1] = new Image() ;
imgLeft[1].src = "./img/ex_a2.gif" ;
imgLeft[2] = new Image() ;
imgLeft[2].src = "./img/ex_a3.gif" ;
imgRight[0] = new Image() ;
imgRight[0].src = "./img/ex_b1.gif" ;
imgRight[1] = new Image() ;
imgRight[1].src = "./img/ex_b2.gif" ;
imgRight[2] = new Image() ;
imgRight[2].src = "./img/ex_b3.gif" ;

// 이미지 링크
var urlLeft = new Array() ;
var urlRight = new Array() ;
urlLeft[0] = "#" ;
urlLeft[1] = "#" ;
urlLeft[2] = "#" ;
urlRight[0] = "1" ;
urlRight[1] = "2" ;
urlRight[2] = "3" ;

var productAll = "" ;
productAll += "<table width='400' cellpadding='0' cellspacing='0' border='1'>" ;
productAll += "<tr><td width='200' height='150' align='center'>" ;
productAll += "<a href='" + urlLeft[0] + "'><img src='" + imgLeft[0].src + "' border='0'></a>" ;
productAll += "</td><td width='200' height='150' align='center'>" ;
productAll += "<a href='" + urlRight[0] + "'><img src='" + imgRight[0].src + "' border='0'></a>" ;
productAll += "</td></tr>" ;
productAll += "<tr><td width='200' height='150' align='center'>" ;
productAll += "<a href='" + urlLeft[1] + "'><img src='" + imgLeft[1].src + "' border='0'></a>" ;
productAll += "</td><td width='200' height='150' align='center'>" ;
productAll += "<a href='" + urlRight[1] + "'><img src='" + imgRight[1].src + "' border='0'></a>" ;
productAll += "</td></tr>" ;
productAll += "<tr><td width='200' height='150' align='center'>" ;
productAll += "<a href='" + urlLeft[2] + "'><img src='" + imgLeft[2].src + "' border='0'></a>" ;
productAll += "</td><td width='200' height='150' align='center'>" ;
productAll += "<a href='" + urlRight[2] + "'><img src='" + imgRight[2].src + "' border='0'></a>" ;
productAll += "</td></tr></table>" ;

var time = 1500 ;
var counter = 1 ;

function imgShowInit() {
productContent = "<div style='left:0px ; width:100% ; position:absolute ; top:0px ; height:450px ;' id='showProduct'>" ;
productContent += productAll ;
productContent += "</div>" ;

document.write(productContent) ;
window.setTimeout("imgShow()", time) ;
}

function imgShow() {
if(counter == 3)
counter = 0 ;

tmp = document.getElementById("showProduct").style ;
tmp.top = -150 * counter ;
counter++ ;

window.setTimeout("imgShow()", time) ;
}
// -->
</script>





<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
<div style="theight:150px ; width:400px ; position:absolute; overflow:hidden; visibility: visible ; border:1px solid #000000 ;" id="productPos">
<script>imgShowInit();</script>
</div>
</td>
</tr>
</table><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

태그 필터 (최대 3개) 전체 개발자 소스 기타 mysql 팁자료실 javascript php linux flash 정규표현식 jquery node.js mobile 웹서버 os 프로그램 강좌 썸네일 이미지관련 도로명주소 그누보드5 기획자 견적서 계약서 기획서 마케팅 제안서 seo 통계 서식 통계자료 퍼블리셔 html css 반응형 웹접근성 퍼블리싱 표준화 반응형웹 홈페이지기초 부트스트랩 angularjs 포럼 스크린리더 센스리더 개발자톡 개발자팁 퍼블리셔톡 퍼블리셔팁 기획자톡 기획자팁 프로그램강좌 퍼블리싱강좌
+
제목 글쓴이 날짜 조회
19년 전 조회 2,684
19년 전 조회 3,491
19년 전 조회 2,023
19년 전 조회 5,453
19년 전 조회 1,783
19년 전 조회 6,141
19년 전 조회 2,944
19년 전 조회 6,124
19년 전 조회 6,903
19년 전 조회 3,802
19년 전 조회 2,276
19년 전 조회 2,179
19년 전 조회 6,965
19년 전 조회 2,462
19년 전 조회 4,017
19년 전 조회 5,415
19년 전 조회 2,742
19년 전 조회 1,792
19년 전 조회 1,636
19년 전 조회 1,587
19년 전 조회 1,861
19년 전 조회 1,877
19년 전 조회 1,864
19년 전 조회 1,782
19년 전 조회 2,569
19년 전 조회 2,383
19년 전 조회 3,538
19년 전 조회 2,665
19년 전 조회 2,637
19년 전 조회 3,472
19년 전 조회 4,697
19년 전 조회 3,051
19년 전 조회 2,871
19년 전 조회 3,411
19년 전 조회 6,362
19년 전 조회 2,268
19년 전 조회 2,068
19년 전 조회 2,034
19년 전 조회 2,073
19년 전 조회 3,262
19년 전 조회 2,329
19년 전 조회 2,014
19년 전 조회 1,710
19년 전 조회 2,168
19년 전 조회 3,444
19년 전 조회 3,295
19년 전 조회 1,988
19년 전 조회 1,567
19년 전 조회 3,241
19년 전 조회 2,122
19년 전 조회 1,689
19년 전 조회 2,917
19년 전 조회 2,041
19년 전 조회 1,931
19년 전 조회 1,888
19년 전 조회 1,845
19년 전 조회 2,287
19년 전 조회 2,699
19년 전 조회 1,854
19년 전 조회 1,598
19년 전 조회 1,607
19년 전 조회 1,559
19년 전 조회 3,284
19년 전 조회 2,986
19년 전 조회 1,732
19년 전 조회 3,485
19년 전 조회 1,909
19년 전 조회 1,553
19년 전 조회 2,028
19년 전 조회 2,162
19년 전 조회 1,720
19년 전 조회 2,403
19년 전 조회 2,051
19년 전 조회 1,676
19년 전 조회 1,850
19년 전 조회 2,106
19년 전 조회 1,880
19년 전 조회 1,654
19년 전 조회 1,717
19년 전 조회 3,216
19년 전 조회 2,064
19년 전 조회 1,925
19년 전 조회 4,434
19년 전 조회 5,058
19년 전 조회 3,223
19년 전 조회 2,958
19년 전 조회 3,565
19년 전 조회 2,101
19년 전 조회 2,468
19년 전 조회 2,748
19년 전 조회 2,827
19년 전 조회 2,431
19년 전 조회 1,688
19년 전 조회 3,452
19년 전 조회 2,041
19년 전 조회 2,451
19년 전 조회 2,518
19년 전 조회 2,952
19년 전 조회 5,289
19년 전 조회 2,538