码迷,mamicode.com
首页 > Web开发 > 详细

一款在论坛上看到的JS封装的随机过渡方式的图片切换效果

时间:2015-08-12 00:56:06      阅读:225      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    <title>一款在论坛上看到的JS封装的随机过渡方式的图片切换效果丨kiddy</title>
    </head>
    <body onkeydown="if(event.keyCode==27) return false;">
    <script type="text/javascript"  src="/images/slide.js"></script>
    <div id="focusViwer">
    <div id="imgADPlayer"></div>
    <script  type="text/javascript">
    var hotimagesarray = eval([{title:"红叶传情",img:"/images/m01.jpg",url:"#nogo"},{title:"野花绽放",img:"/images/m02.jpg",url:"#nogo"},{title:"往事如茶",img:"/images/m03.jpg",url:"#nogo"},{title:"油菜花开",img:"/images/m04.jpg",url:"#nogo"},{title:"玫瑰情思",img:"/images/m05.jpg",url:"#nogo"}]);
    for (i = 0; i < hotimagesarray.length; i++) {
    var title=16>0?hotimagesarray[i].title.substr(0,16):‘‘;
    PImgPlayer.addItem("" + title + "", "" + hotimagesarray[i].url + "", "" + hotimagesarray[i].img + "");
    }
    if(hotimagesarray.length>0)
    PImgPlayer.init("imgADPlayer", 320, 240);
    </script>
    </div>
    </body>
    </html>
    <br>所需js文件:<a href="/images/slide.js" target="_blank">slide.js</a><br><hr>
    

 

一款在论坛上看到的JS封装的随机过渡方式的图片切换效果

标签:

原文地址:http://www.cnblogs.com/youtianxia/p/4722670.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!