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

<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,432
19년 전 조회 1,944
19년 전 조회 5,375
19년 전 조회 1,693
19년 전 조회 6,051
19년 전 조회 2,871
19년 전 조회 6,036
19년 전 조회 6,831
19년 전 조회 3,722
19년 전 조회 2,204
19년 전 조회 2,097
19년 전 조회 6,894
19년 전 조회 2,395
19년 전 조회 3,948
19년 전 조회 5,334
19년 전 조회 2,680
19년 전 조회 1,734
19년 전 조회 1,573
19년 전 조회 1,516
19년 전 조회 1,794
19년 전 조회 1,786
19년 전 조회 1,778
19년 전 조회 1,715
19년 전 조회 2,506
19년 전 조회 2,308
19년 전 조회 3,466
19년 전 조회 2,593
19년 전 조회 2,572
19년 전 조회 3,413
19년 전 조회 4,627
19년 전 조회 2,962
19년 전 조회 2,801
19년 전 조회 3,347
19년 전 조회 6,281
19년 전 조회 2,183
19년 전 조회 1,989
19년 전 조회 1,940
19년 전 조회 2,000
19년 전 조회 3,190
19년 전 조회 2,261
19년 전 조회 1,950
19년 전 조회 1,624
19년 전 조회 2,076
19년 전 조회 3,360
19년 전 조회 3,228
19년 전 조회 1,906
19년 전 조회 1,479
19년 전 조회 3,175
19년 전 조회 2,051
19년 전 조회 1,616
19년 전 조회 2,836
19년 전 조회 1,966
19년 전 조회 1,840
19년 전 조회 1,813
19년 전 조회 1,780
19년 전 조회 2,203
19년 전 조회 2,623
19년 전 조회 1,782
19년 전 조회 1,519
19년 전 조회 1,531
19년 전 조회 1,456
19년 전 조회 3,223
19년 전 조회 2,912
19년 전 조회 1,668
19년 전 조회 3,404
19년 전 조회 1,832
19년 전 조회 1,481
19년 전 조회 1,947
19년 전 조회 2,089
19년 전 조회 1,624
19년 전 조회 2,331
19년 전 조회 1,984
19년 전 조회 1,596
19년 전 조회 1,776
19년 전 조회 2,030
19년 전 조회 1,782
19년 전 조회 1,586
19년 전 조회 1,650
19년 전 조회 3,116
19년 전 조회 1,987
19년 전 조회 1,858
19년 전 조회 4,359
19년 전 조회 4,985
19년 전 조회 3,150
19년 전 조회 2,883
19년 전 조회 3,483
19년 전 조회 2,030
19년 전 조회 2,382
19년 전 조회 2,681
19년 전 조회 2,753
19년 전 조회 2,343
19년 전 조회 1,605
19년 전 조회 3,372
19년 전 조회 1,968
19년 전 조회 2,378
19년 전 조회 2,443
19년 전 조회 2,867
19년 전 조회 5,197
19년 전 조회 2,479
🐛 버그신고