本文实例讲述了淡入淡出的js图片轮播效果代码。分享给大家供大家参考。具体如下:
运行效果图:----------------------查看效果-----------------------
小提示:浏览器中如果不能正常运行,可以尝试切换浏览模式。
为大家分享的js图片轮播效果代码如下
<html> <head> <title>js图片轮播效果代码</title> <style type="text/css"> table img:hover{cursor:pointer;} </style> </head> <body> <div align="center"> <SCRIPT> var roll_image = new Array; var image_link = new Array; var small_img = new Array; roll_image[0] = 'images/01.jpg'; image_link[0] = 'http://www.lanrentuku.com'; small_img[0] = 'images/main_flash_button1_on.gif'; roll_image[1] = 'images/02.jpg'; image_link[1] = 'http://www.lanrentuku.com'; small_img[1] = 'images/main_flash_button2_on.gif'; roll_image[2] = 'images/03.jpg'; image_link[2] = 'http://www.lanrentuku.com'; small_img[2] = 'images/main_flash_button3_on.gif'; roll_image[3] = 'images/04.jpg'; image_link[3] = 'http://www.lanrentuku.com'; small_img[3] = 'images/main_flash_button4_on.gif'; roll_image[4] = 'images/05.jpg'; image_link[4] = 'http://www.lanrentuku.com'; small_img[4] = 'images/main_flash_button5_on.gif'; roll_image[5] = 'images/06.jpg'; image_link[5] = 'http://www.lanrentuku.com'; small_img[5] = 'images/main_flash_button6_on.gif'; roll_image[6] = 'images/07.jpg'; image_link[6] = 'http://www.lanrentuku.com'; small_img[6] = 'images/main_flash_button7_on.gif'; var cliImg = ''; var cliImgSrc = ''; var imgNo = Math.round(Math.random() * 7); var interval = 3000; var setTime = ''; function click_simg(ci, no){ var pImg = document.all.bigimg; var pLink = document.all.imglink; if(cliImg == '') { cliImg = ci; cliImgSrc = ci.src; ci.src = small_img[no]; imgNo=no; pImg.src =roll_image[no]; pLink.href = image_link[no]; } else if(cliImg != ci) { cliImg.src = cliImgSrc; cliImg = ci; cliImgSrc = ci.src; ci.src = small_img[no]; imgNo=no; pImg.src =roll_image[no]; pLink.href = image_link[no]; } clearTimeout(setTime); setTime=setTimeout("rotate()",interval); } function rotate(){ imgNo = (imgNo >= 6) "rotate()",interval); } //--> </SCRIPT> <TABLE cellSpacing=0 cellPadding=0 width=520 border=0> <TBODY> <TR> <TD height=338> <A onfocus=this.blur() href="#" name=imglink><IMG style="FILTER: blendTrans(duration=1)" height=338 src="/UploadFiles/2021-04-02/01.jpg">精彩专题分享:jQuery图片轮播 JavaScript图片轮播 Bootstrap图片轮播
以上就是为大家分享的js图片轮播效果代码,希望大家可以喜欢。
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“js淡入淡出的图片轮播效果代码分享”评论...