<html>
<head>
</head>

<body>

<script language="javascript">

//시간 (1초 = 1000)
var delay=1000
var curindex=0

var randomimages=new Array()

//이미지

        randomimages[0]="http://oxtag.com/html/img/banner1.gif"
        randomimages[1]="http://oxtag.com/html/img/banner4.gif"
        randomimages[2]="http://oxtag.com/html/img/banner3.gif"
        randomimages[3]="http://oxtag.com/html/img/banner/jjin_tagpia.gif"
        randomimages[4]="http://oxtag.com/html/img/banner/sole_tagpia1.gif"
        randomimages[5]="http://oxtag.com/html/img/banner2.gif"

var preload=new Array()

for (n=0;n<randomimages.length;n++)
{
        preload[n]=new Image()
        preload[n].src=randomimages[n]
}

document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">')

function rotateimage()
{

if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0? 1 : curindex-1
}
else
curindex=tempindex

        document.images.defaultimage.src=randomimages[curindex]
}

setInterval("rotateimage()",delay)

</script>


</body>
</html> 

- 펌 - http://suldo.zotta.net/

Posted by 알 수 없는 사용자
,