<!DOCTYPE html>

<html>

<head>

<meta charset="EUC-KR">

<title>Insert title here</title>

<script type="text/javascript">

imgArr = new Array();


cnt = 1;

for (i = 1; i < 4; i++) {

imgArr[i] = "a" + i + ".png";

}


function imgChange(E) {


if (E.target.name == "btn1") {

if (cnt == 1)

cnt = 3;

else

cnt--;


document.img3.src = imgArr[cnt];


} else if (E.target.name == "btn2") {


if (cnt == 3)

cnt = 1;

else

cnt++;


document.img3.src = imgArr[cnt];

} else if (E.target.name == "firstBtn") {

cnt = 3;

document.img3.src = imgArr[cnt];

} else if (E.target.name == "lastBtn") {

cnt = 2;

document.img3.src = imgArr[cnt];

}


}


function imgAuto() {


setInterval(function() {

document.img3.src = imgArr[cnt];

cnt++;

if (cnt > 3)

cnt = 1;

}, 100);

}


document.onclick = imgChange;

</script>

</head>

<body bgcolor="black">

<form>

<center>

<h3>

<font color="white">사진 감상</font>

</h3>

</center>

<input type="button" name="firstBtn" value="<<"> <input type="button" name="btn1" value="<"> <input type="button" name="btn2"

value=">"> <input type="button" name="lastBtn" value=">>"> <input type="button" name="autoBtn" value="auto" onclick="imgAuto()">

<input type=button name=simabuttonviewsource value="Stop" onClick='window.location.reload()'> </br> <img src="a3.png" name="img3">

</form>

</body>

</html>



블로그 이미지

왕왕왕왕

,