Tag, Css, Script
|
<html>
<head>
<title> 연습할 문서의 제목
<script language="javascript">
var no = 0;
function change_Image() {
var Image_array = new Array(2); // Image 개수 -1
Image_array[0] = "<a href='http://kr.yahoo.com' target='_blank'> <marquee behavior='slide' direction='up' height='450' scrollamount='10'> <img src='1.jpg' border='0'></marquee></a>";
Image_array[1] = "<a href='http://paran.com' target='_blank'> <marquee behavior='slide' direction='right'>< img src='2.jpg' border='0'></marquee></a>";
Image_array[2] = "<a href='http://nate.com' target='_blank'> <marquee behavior='slide'><img src='3.jpg' border='0'></marquee></a>";
no=no + 1;
if (no > 2) no = 0;
Image_Holder.innerHTML = Image_array[no];
switch (no) {
case 1: { Image_Holder.style.backgroundImage='url('+'1.jpg'+')'; break; }
case 2: { Image_Holder.style.backgroundImage='url('+'2.jpg'+')'; break; }
default: { Image_Holder.style.backgroundImage='url('+'3.jpg'+')'; }
}
setTimeout("change_Image()",5000); // 2초마다 change_Image 함수를 재호출
}
window.onload = change_Image; // 페이지 로딩 시 change_Image 함수를 호출
</script>
</head>
<body>
<div id="Image_Holder" align="center" style="filter:progid:DXImageTransform.Microsoft.Slide(duration=3,bands=8);
width:300;height:450;">
<marquee>
<img src="1.jpg" border='0'></marquee>
</div>
</body>
</html>
|