图片幻灯片显示

鼠标指上图片时,图片停止变换,当鼠标移开后又继续变换:
<html>
<body>
aaa
<script language="JavaScript">
<!--
function objSP_Article() {this.ImgUrl=""this.LinkUrl=""this.Title="";}
function SlidePic_Article(_id) {this.ID=_id; this.Width=0;this.Height=0this.TimeOut=5000this.Effect=23this.TitleLen=0this.PicNum=-1this.Img=nullthis.AllPic=new Array(); this.Add=SlidePic_Article_Add; this.Show=SlidePic_Article_Show; this.LoopShow=SlidePic_Article_LoopShow;}
function SlidePic_Article_Add(_SP) {this.AllPic[this.AllPic.length] = _SP;}
function SlidePic_Article_Show() {
  
if(this.AllPic[0== nullreturn false;
  document.write(
"<div align='center'><img id='Img_" + this.ID + "' style='width:" + this.Width + "px; height:" + this.Height + "px; filter: revealTrans(duration=2,transition=23);' src='javascript:null' border='0' >");
  document.write(
"</div>");
  
this.Img = document.getElementById("Img_" + this.ID);
  
this.LoopShow();
}

function SlidePic_Article_LoopShow() {
  
if(this.PicNum<this.AllPic.length-1this.PicNum++ ; 
  
else this.PicNum=0
  
this.Img.filters.revealTrans.Transition=this.Effect; 
  
this.Img.filters.revealTrans.apply(); 
  
this.Img.src=this.AllPic[this.PicNum].ImgUrl;
  
this.Img.filters.revealTrans.play();
timer
=setTimeout(this.ID+".LoopShow()",this.TimeOut);
  
this.Img.onmouseover=function(){clearTimeout(timer);}
  
this.Img.onmouseout=function(){timer=setTimeout("SlidePic_271.LoopShow()",this.TimeOut);}
  }

function clearT(){


}

//-->
</script>
<script language=JavaScript>
<!--

var SlidePic_271 = new SlidePic_Article("SlidePic_271");
SlidePic_271.Width    
= 300;
SlidePic_271.Height   
= 225;
SlidePic_271.TimeOut  
= 5000;
SlidePic_271.Effect   
= 23;
SlidePic_271.TitleLen 
= 0;
var oSP = new objSP_Article();
oSP.ImgUrl         
= "/upimg/<%=rs("pic1")%>";
SlidePic_271.Add(oSP);
var oSP = new objSP_Article();
oSP.ImgUrl         
= "/upimg/<%=rs("pic2")%>";
SlidePic_271.Add(oSP);
var oSP = new objSP_Article();
oSP.ImgUrl         
= "/upimg/<%=rs("pic3")%>";
SlidePic_271.Add(oSP);

SlidePic_271.Show();
//-->
</script>
</body>
</html>

posted on 2007-06-26 11:07    阅读(237)  评论(0编辑  收藏  举报

导航