用javascript实现的图片马赛克后显示并切换加文字功能

时间:2021-05-18

<scriptlanguage="JavaScript1.1">

varslidespeed=3000

varslideimages=newArray("http:///articleimg/upload/2006/3/5/2482150_1_7.jpg"name="slide"border=0width=200pxheight="200px"style="filter:progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=15,Duration=1)"></td>
<td><divid=text>
</div></td>
</tr>
<tr>
<td><divid=text1>
</div>
</td>
</tr>
<tr>
<td><divid=text2>
</div>
</td>
</tr>
</table>

<divid=aa></div>


<scriptlanguage="JavaScript1.1">
<!--
varwhichlink=0
varwhichimage=0
varpixeldelay=(ie55)?document.images.slide.filters[0].duration*1000:0
functionslideit(){
if(!document.images)return
whichlink=whichimage;
if(whichimage<slideimages.length){
whichimage=whichimage+1;
}else{whichimage=1}

if(ie55)document.images.slide.filters[0].apply()
varthesrc=(whichimage-1)>0?thesrc=whichimage-1:0
document.images.slide.src=imageholder[thesrc].src
if(ie55)document.images.slide.filters[0].play()
text.innerText=(whichimage<slideimages.length+1)?texts[whichimage-1]:0;
aa.innerText=whichimage;
text1.innerText=(whichimage<slideimages.length+1)?texts1[whichimage-1]:0;
text2.innerText=(whichimage<slideimages.length+1)?texts2[whichimage-1]:0;
setTimeout("slideit()",slidespeed+pixeldelay)
}
slideit()

//-->
</script>
<html>
<body>
</body>
</html>

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章