本文实例讲述了js图片模糊切换显示特效的方法。分享给大家供大家参考。具体实现方法如下:
复制代码 代码如下:<html>
<title>一款图片模糊切换显示效果</title>
<body>
<script language="JavaScript1.1">
<!--
var slidespeed=3000
var slideimages=new Array("/images/m01.jpg","/images/m02.jpg","/images/m03.jpg","/images/m04.jpg")
var slidelinks=new Array("http://www.jb51.net","http://www.jb51.net","http://www.jb51.net")
var imageholder=new Array()
var ie55=window.createPopup
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}
function gotoshow(){
window.location=slidelinks[whichlink]
}
//-->
</script>
<a href="javascript:gotoshow()"><img src="http://www.jb51.netimages/csrcode.ico" name="slide" border=0/></a>
<script language="JavaScript1.1">
<!--
var whichlink=0
var whichimage=0
var pixeldelay=(ie55)? document.images.slide.filters[0].duration*1000 : 0
function slideit(){
if (!document.images) return
if (ie55) document.images.slide.filters[0].apply()
document.images.slide.src=imageholder[whichimage].src
if (ie55) document.images.slide.filters[0].play()
whichlink=whichimage
whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
setTimeout("slideit()",slidespeed+pixeldelay)
}
slideit()
//-->
</script>
</body>
</html>
希望本文所述对大家的javascript程序设计有所帮助。
【js图片模糊切换显示特效的方法】相关文章:
★ 图片之间的切换