본문 바로가기
IT 인터넷

[스크립트]그림을 클릭하면 다음 그림으로 변하게...

by zzom~ 2024. 8. 20.
반응형
<html>
<head>
   <meta http-equiv='Cache-Control' content='no-cache'>
   <meta http-equiv='Progma' content='no-cache'>
   <title>타이틀</title>
   <meta http-equiv=Content-Type content=text/html; charset=EUC-KR>  

   <script>
     var cur_idx  = 0;
     var img_list = new Array();

     img_list[0] = "그림경로1";
     img_list[1] = "그림경로2";
     img_list[2] = "그림경로3";
     img_list[3] = "그림경로4";
     img_list[4] = "그림경로5";


   function showNext(obj) {
     var idx = cur_idx+1;
     if(idx >= img_list.length) idx = 0;

     obj.filters.blendTrans.Apply();
     obj.src = img_list[idx];
     obj.filters.blendTrans.Play();

     cur_idx = idx;

     if(typeof(page_cnt)!="undefined") {
       page_cnt.innerHTML = cur_idx+1;
     }
     return;
   }
   </script>

</head>
<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=#000000>

<table border=0 cellspacing=0 cellpadding=0 width=100% height=100%>
<tr>
 <td align=center valign=center>
   <table border=0 cellspacing=0 cellpadding=0 width=600>
   <tr>
     <td align=right><img src="그림경로1" border=0 onClick="showNext(this)" style="filter:blendTrans(Duration=,enabled=false);cursor:pointer"></td>
   </tr>    </table>
 </td>
</tr>
</table>

</body>
</html>
반응형