时间:2016.04.29 发布人:cyjwlj888
已解决问题
谷歌cyjwlj888用户在2016.04.29提交了关于“
重生之大涅磐图片轮播js代码”的提问,欢迎大家涌跃发表自己的观点。目前共有1个回答,最后更新于2025-02-27T00:06:42。希望大家能够帮助她。
详细问题描述及疑问:期待您的答案,你无异于雪中送炭,让我感激涕零
!
希望以下的回答,能够帮助你。
第1个回答
用户名:y来自jt51888
图片轮播js代码,简洁明了,可代替flash轮播功能!
<div
style="width:287px;height:248问答px;border:solid1px#cecece;background:#F3F3F3命委缺煤反快波罗完维认;padding:6px;"><SCRIPTlanguage="j**ascript"type="tex岁度皇前最t/j**ascrip系几先围非查众t">varwidths=量些介燃287;//宽varheights=242;//高varcounts=4; //显示的数量im音组黑绿地校乙矿纸尽烧g1=newIm判白节总城史去age();img1.src=’images/index/3.jpg’;//图片地址img2=newImage();img2.src=’im跑无静个矿钱整ages/index/4.j序围于游端哪充pg’;img3=newImage();img3.src=’images/index/2.jpg’;img4=newImage();img4.src=’images/index/1.jpg’;结龙孩url1=newIma被权协曾绝ge();url1.src=’http://URL?action-viewnews-itemid-2439’;//图片链接的URLurl2=newImage();url2.src=’h和围尔烟究亚论宗被草ttp://URL/?action-viewnews-itemid-2386-page-1’;url3=newImage();url3.src=’http://URL/?action-viewnews爱垂小济于扬茶-itemid-2384-page-4’;url4=newImage();url4.s山林图rc=’http://URL/?action-view结news-itemid-2377-page-2’;varnn=1;varkey=0;functionchange_img(){if(key==0){key=1;}elseif(do求业控族灯攻历消正帝刑cument.all){document.getElementById汽夫尔受座海确出船酒将("pic").filters[0].Ap院从率宣ply();document.getElementById("pic").filters[0].Play(**ration=2);}eval(’document.getElementById("pic").src=img’+nn+’.src’);eval(’document.getElementById("url").href=url’+nn+’.src’);for(vari=1;i<=counts;i++){document.getElementById("xxjdjj"+i).className=’axx’;}document.getElementById("xxjdjj"+nn).className=’bxx’;nn++;if(nn>counts){nn=1;}tt=setTimeout(’change_img()’,6000);}functionchangeimg(n){nn=n;window.clearInterval(tt);change_img();}document.write(’<style>’);document.write(’.axx{padding:1px7px;border-left:#ffffff1pxsolid;font-weight:bold;}’);document.write(’a.axx:link,a.axx:visited{text-decoration:none;color:#fff;line-height:14px;font:11pxsans-serif;font-weight:bold;}’);document.write(’a.axx:active,a.axx:hover{text-decoration:none;color:#fff;line-height:14px;font:11pxsans-serif;font-weight:bold;}’);document.write(’.bxx{padding:1px7px;border-left:#ffffff1pxsolid;font-weight:bold;}’);document.write(’a.bxx:link,a.bxx:visited{text-decoration:none;color:#fff;line-height:14px;font:11pxsans-serif;background-color:#ff0000;font-weight:bold;}’);document.write(’a.bxx:active,a.bxx:hover{text-decoration:none;color:#fff;line-height:14px;font:11pxsans-serif;background-color:#ff0000;font-weight:bold;}’);document.write(’</style>’);document.write(’<divstyle="width:’+widths+’px;height:’+heights+’px;overflow:hidden;text-overflow:clip;">’);document.write(’<div><aid="url"target="_blank"><imgid="pic"style="border:0px;filter:progid:dximagetransform.microsoft.wipe(gradientsize=1.0,wipestyle=4,motion=forward)"width=’+widths+’height=’+heights+’/></a></div>’);document.write(’<divstyle="filter:alpha(style=1,opacity=10,finishOpacity=80);background:#000000;width:100%-2px;text-align:right;top:-14px;position:relative;margin:1px;height:20px;padding:0px;margin:0px;border:0px;">’);for(vari=1;i<counts+1;i++){document.write(’<ahref="j**ascript:changeimg(’+i+’);"id="xxjdjj’+i+’"class="axx"target="_self">’+i+’</a>’);}document.write(’</div></div>’);change_img();</SCRIPT></div>