2010年2月22日 星期一

動態換圖




<script language="javascript" type="text/javascript">
function view(t){
switch(t){
case 1:
document.getElementById("img").innerHTML = '<img src="/pub/archive/pics/<%if $this.veryhot_folder.0.Img != ""%><%$this.veryhot_folder.0.Img%><%else%>pic_no_pix_s.jpg<%/if%>" width="360" style="border:4px solid #FFF;">';
break;
case 2:
document.getElementById("img").innerHTML = '<img src="/pub/archive/pics/<%if $this.veryhot_folder.0.Pic1 != ""%><%$this.veryhot_folder.0.Pic1%><%else%>pic_no_pix_s.jpg<%/if%>" width="360" style="border:4px solid #FFF;">';
break;
case 3:
document.getElementById("img").innerHTML = '<img src="/pub/archive/pics/<%if $this.veryhot_folder.0.Pic2 != ""%><%$this.veryhot_folder.0.Pic2%><%else%>pic_no_pix_s.jpg<%/if%>" width="360" style="border:4px solid #FFF;">';
break;
case 4:
document.getElementById("img").innerHTML = '<img src="/pub/archive/pics/<%if $this.veryhot_folder.0.Pic3 != ""%><%$this.veryhot_folder.0.Pic3%><%else%>pic_no_pix_s.jpg<%/if%>" width="360" style="border:4px solid #FFF;">';
break;
}
}
</script>



<div style=" float:left;width:120px; height:120px;border:1px solid #CACACA; margin:2px;">
<a href="javascript:view(1)"><img height="120" width="120" src="/pub/archive/pics/<%if $index.Img != ""%><%$index.Img%><%else%>pic_no_pix_s.jpg<%/if%>" style="cursor: pointer;"></a></div>
<div style=" float:left;width:120px; height:120px;border:1px solid #CACACA; margin:2px;">
<a href="javascript:view(2)"><img height="120" width="120" src="/pub/archive/pics/<%if $index.Pic1 != ""%><%$index.Pic1%><%else%>pic_no_pix_s.jpg<%/if%>" style="cursor: pointer;"></a></div>

1 則留言: