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

<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,726
19년 전 조회 3,536
19년 전 조회 2,065
19년 전 조회 5,486
19년 전 조회 1,820
19년 전 조회 6,181
19년 전 조회 2,995
19년 전 조회 6,166
19년 전 조회 6,945
19년 전 조회 3,849
19년 전 조회 2,318
19년 전 조회 2,211
19년 전 조회 6,999
19년 전 조회 2,495
19년 전 조회 4,056
19년 전 조회 5,449
19년 전 조회 2,779
19년 전 조회 1,829
19년 전 조회 1,680
19년 전 조회 1,620
19년 전 조회 1,903
19년 전 조회 1,910
19년 전 조회 1,899
19년 전 조회 1,822
19년 전 조회 2,609
19년 전 조회 2,422
19년 전 조회 3,573
19년 전 조회 2,703
19년 전 조회 2,672
19년 전 조회 3,511
19년 전 조회 4,733
19년 전 조회 3,079
19년 전 조회 2,914
19년 전 조회 3,456
19년 전 조회 6,384
19년 전 조회 2,304
19년 전 조회 2,098
19년 전 조회 2,069
19년 전 조회 2,119
19년 전 조회 3,299
19년 전 조회 2,367
19년 전 조회 2,050
19년 전 조회 1,749
19년 전 조회 2,201
19년 전 조회 3,477
19년 전 조회 3,325
19년 전 조회 2,030
19년 전 조회 1,595
19년 전 조회 3,277
19년 전 조회 2,163
19년 전 조회 1,721
19년 전 조회 2,955
19년 전 조회 2,082
19년 전 조회 1,966
19년 전 조회 1,920
19년 전 조회 1,889
19년 전 조회 2,322
19년 전 조회 2,743
19년 전 조회 1,890
19년 전 조회 1,641
19년 전 조회 1,641
19년 전 조회 1,596
19년 전 조회 3,318
19년 전 조회 3,026
19년 전 조회 1,762
19년 전 조회 3,523
19년 전 조회 1,952
19년 전 조회 1,591
19년 전 조회 2,064
19년 전 조회 2,203
19년 전 조회 1,759
19년 전 조회 2,449
19년 전 조회 2,093
19년 전 조회 1,714
19년 전 조회 1,894
19년 전 조회 2,147
19년 전 조회 1,915
19년 전 조회 1,694
19년 전 조회 1,757
19년 전 조회 3,260
19년 전 조회 2,111
19년 전 조회 1,975
19년 전 조회 4,473
19년 전 조회 5,098
19년 전 조회 3,268
19년 전 조회 2,996
19년 전 조회 3,608
19년 전 조회 2,146
19년 전 조회 2,509
19년 전 조회 2,795
19년 전 조회 2,869
19년 전 조회 2,473
19년 전 조회 1,736
19년 전 조회 3,511
19년 전 조회 2,087
19년 전 조회 2,490
19년 전 조회 2,560
19년 전 조회 2,995
19년 전 조회 5,319
19년 전 조회 2,589