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

<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>
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

프로그램

+
제목 글쓴이 날짜 조회
19년 전 조회 2,619
19년 전 조회 3,430
19년 전 조회 1,943
19년 전 조회 5,373
19년 전 조회 1,691
19년 전 조회 6,049
19년 전 조회 2,869
19년 전 조회 6,036
19년 전 조회 6,831
19년 전 조회 3,721
19년 전 조회 2,203
19년 전 조회 2,097
19년 전 조회 6,892
19년 전 조회 2,392
19년 전 조회 3,947
19년 전 조회 5,334
19년 전 조회 2,680
19년 전 조회 1,733
19년 전 조회 1,571
19년 전 조회 1,515
19년 전 조회 1,793
19년 전 조회 1,786
19년 전 조회 1,778
19년 전 조회 1,714
19년 전 조회 2,506
19년 전 조회 2,307
19년 전 조회 3,464
19년 전 조회 2,593
19년 전 조회 2,570
19년 전 조회 3,413
19년 전 조회 4,626
19년 전 조회 2,961
19년 전 조회 2,800
19년 전 조회 3,346
19년 전 조회 6,281
19년 전 조회 2,183
19년 전 조회 1,987
19년 전 조회 1,939
19년 전 조회 2,000
19년 전 조회 3,189
19년 전 조회 2,260
19년 전 조회 1,950
19년 전 조회 1,623
19년 전 조회 2,075
19년 전 조회 3,359
19년 전 조회 3,227
19년 전 조회 1,905
19년 전 조회 1,477
19년 전 조회 3,175
19년 전 조회 2,050
19년 전 조회 1,615
19년 전 조회 2,836
19년 전 조회 1,964
19년 전 조회 1,839
19년 전 조회 1,813
19년 전 조회 1,778
19년 전 조회 2,201
19년 전 조회 2,621
19년 전 조회 1,781
19년 전 조회 1,517
19년 전 조회 1,531
19년 전 조회 1,454
19년 전 조회 3,222
19년 전 조회 2,912
19년 전 조회 1,665
19년 전 조회 3,404
19년 전 조회 1,830
19년 전 조회 1,481
19년 전 조회 1,946
19년 전 조회 2,086
19년 전 조회 1,622
19년 전 조회 2,330
19년 전 조회 1,983
19년 전 조회 1,595
19년 전 조회 1,776
19년 전 조회 2,030
19년 전 조회 1,780
19년 전 조회 1,585
19년 전 조회 1,646
19년 전 조회 3,115
19년 전 조회 1,987
19년 전 조회 1,856
19년 전 조회 4,358
19년 전 조회 4,985
19년 전 조회 3,148
19년 전 조회 2,881
19년 전 조회 3,482
19년 전 조회 2,029
19년 전 조회 2,381
19년 전 조회 2,679
19년 전 조회 2,752
19년 전 조회 2,341
19년 전 조회 1,604
19년 전 조회 3,372
19년 전 조회 1,967
19년 전 조회 2,374
19년 전 조회 2,442
19년 전 조회 2,867
19년 전 조회 5,196
19년 전 조회 2,479
🐛 버그신고