详解javascript-图片马赛克后显示和切换加文字的…

2019-09-30 06:43:12来源:爱站网 阅读 ()

新老客户大回馈,云服务器低至5折

JavaScript在开发中起到非常终于的左右,我们经常将函数写入javascript类库中进行实现,下面爱站技术频道小编就给大家详解javascript-图片马赛克后显示和切换加文字的功能,一起跟着小编的步伐来看看吧!

<script?language="JavaScript1.1">

var?slidespeed=3000

var?slideimages=new?Array("/info/upimg/allimg/190930/064A05I8-0.jpg","http://www.blueidea.com/articleimg/upload/2006/3/5/2482150_2_1.jpg","http://www.blueidea.com/articleimg/upload/2006/3/5/2482150_3_2.jpg","http://www.blueidea.com/articleimg/upload/2006/3/5/2482150_3_2.jpg","http://www.blueidea.com/articleimg/upload/2006/3/5/2482150_3_2.jpg")

var?texts?=?new?Array?("11111","22222","33333","44444","55555")
var?texts1?=?new?Array?("11111","22222","33333","44444","55555")
var?texts2?=?new?Array?("11111","22222","33333","44444","55555")
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>
<table?width="200"?border="1">
??<tr>
????<td?colspan="2"?rowspan="3"><img?src="/info/upimg/allimg/190930/064A05I8-0.jpg"?name="slide"?border=0?width=200px?height="200px"?style="filter:progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=15,Duration=1)"></td>
????<td><div?id=text>
</div></td>
??</tr>
??<tr>
????<td><div?id=text1>
????</div>
????</td>
??</tr>
??<tr>
????<td><div?id=text2>
????</div>
????</td>
??</tr>
</table>

<div?id=aa></div>


<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
whichlink=whichimage;
if(whichimage<slideimages.length){
whichimage=whichimage+1;
}else{whichimage=1}
/*
whichimage=(whichimage<slideimages.length-1)??whichimage+1?:?0;
whichimage=(whichimage>=slideimages.length)?whichimage=slideimages.length:whichimage;
*/
if?(ie55)?document.images.slide.filters[0].apply()
var?thesrc=(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>

以上这些是爱站技术频道小编给大家介绍的详解javascript-图片马赛克后显示和切换加文字的功能,想了解更多相关信息,敬请继续关注爱站技术频道!


原文链接:https://js.aizhan.com/develop/JavaScript/9201.html
如有疑问请与原作者联系

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:js-弹出窗口的变通实现方法

下一篇:CSS+Jquery实现页面圆角框方法大全