资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
javascript 控制图片播放代码
<!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=gb2312" /> <title>无标题文档</title> <style type="text/css"> .photo {width:896px;height:280px;border-top:0;border-right:2px solid #9f9fa1;border-bottom:1px solid #9f9fa1;border-left:2px solid #9f9fa1;font-size:12px} .photo .left {width:310px;height:222px;margin:0 5px} .photo .left img {width:310px;height:250px} .photo ul li {float:left;list-style-type:none;width:140px;height:135px} .photo ul li img {width:130px;height:115px;border:1px solid #999} .photo ul li div {line-height:19px;height:19px;overflow:hidden} #fc {filter:progid:DXImageTransform.Microsoft.Fade (duration=0.5,overlap=1.0)} #con,#num {height:20px;line-height:20px;overflow:hidden} #con {float:left;width:200px;text-align:center} #num {float:right;width:110px} #num span {cursor:pointer;width:15px;height:15px;display:block;float:left;margin:0 1px;line-height:16px;overflow:hidden;margin-top:2px;text-align:center;} .bigon{background:url("numon.gif");color:#fff} /*长为15px 宽为15px*/ .bigoff{background:url("numoff.gif");color:#000} </style> </head> <body> <div> <div> <div id="fc"> <div style="display:block;"> <a href="read-htm-tid-179819.html" _ewebeditor_ta_href="read-htm-tid-179819.html" target="_blank"><img src="http://bbs.kshot.net/home/flashpic/a.jpg" _ewebeditor_ta_src="http%3A%2F%2Fbbs.kshot.net%2Fhome%2Fflashpic%2Fa.jpg" alt="" onmouseover="clearAuto();" onmouseout="setAuto()" /></a> </div> <div style="display:none;"> <a href="read-htm-tid-173921.html" _ewebeditor_ta_href="read-htm-tid-173921.html" target="_blank"><img src="http://bbs.kshot.net/home/flashpic/b.jpg" _ewebeditor_ta_src="http%3A%2F%2Fbbs.kshot.net%2Fhome%2Fflashpic%2Fb.jpg" alt="" onmouseover="clearAuto();" onmouseout="setAuto()" /></a> </div> <div style="display:none;"> <a href="read-htm-tid-172063.html" _ewebeditor_ta_href="read-htm-tid-172063.html" target="_blank"><img src="http://bbs.kshot.net/home/flashpic/c.jpg" _ewebeditor_ta_src="http%3A%2F%2Fbbs.kshot.net%2Fhome%2Fflashpic%2Fc.jpg" alt="" onmouseover="clearAuto();" onmouseout="setAuto()" /></a> </div> <div style="display:none;"> <a href="read-htm-tid-190837.html" _ewebeditor_ta_href="read-htm-tid-190837.html" target="_blank"><img src="http://bbs.kshot.net/home/flashpic/d.jpg" _ewebeditor_ta_src="http%3A%2F%2Fbbs.kshot.net%2Fhome%2Fflashpic%2Fd.jpg" alt="" onmouseover="clearAuto();" onmouseout="setAuto()" /></a> </div> <div style="display:none;"> <a href="read-htm-tid-151299.html" _ewebeditor_ta_href="read-htm-tid-151299.html" target="_blank"><img src="http://bbs.kshot.net/home/flashpic/e.jpg" _ewebeditor_ta_src="http%3A%2F%2Fbbs.kshot.net%2Fhome%2Fflashpic%2Fe.jpg" alt="" onmouseover="clearAuto();" onmouseout="setAuto()" /></a> </div> <div style="display:none;"> <a href="read-htm-tid-116979.html" _ewebeditor_ta_href="read-htm-tid-116979.html" target="_blank"><img src="http://bbs.kshot.net/home/flashpic/f.jpg" _ewebeditor_ta_src="http%3A%2F%2Fbbs.kshot.net%2Fhome%2Fflashpic%2Ff.jpg" alt="" onmouseover="clearAuto();" onmouseout="setAuto()" /></a> </div> </div> <div id="con"> <div style="display:block;"> <a href="read-htm-tid-179819.html" _ewebeditor_ta_href="read-htm-tid-179819.html" target="_blank">昆山论坛"新世军"军团掠影</a> </div> <div style="display:none;"> <a href="read-htm-tid-173921.html" _ewebeditor_ta_href="read-htm-tid-173921.html" target="_blank">2009年昆山第三届徒步大会昆坛会员合影</a> </div> <div style="display:none;"> <a href="read-htm-tid-172063.html" _ewebeditor_ta_href="read-htm-tid-172063.html" target="_blank">昆坛会员相聚阳澄湖畔野炊活动</a> </div> <div style="display:none;"> <a href="read-htm-tid-190837.html" _ewebeditor_ta_href="read-htm-tid-190837.html" target="_blank">昆坛大合唱"相亲相爱一家人"家人风采</a> </div> <div style="display:none;"> <a href="read-htm-tid-151299.html" _ewebeditor_ta_href="read-htm-tid-151299.html" target="_blank">"我是女生"昆山论坛网友秀</a> </div> <div style="display:none;"> <a href="read-htm-tid-116979.html" _ewebeditor_ta_href="read-htm-tid-116979.html" target="_blank">昆山首届万圣节系列图片大放送</a> </div> </div> <div id="num"> <span onclick="Mea(0);" onmouseover="clearAuto();" onmouseout="setAuto()">1</span> <span onclick="Mea(1);" onmouseover="clearAuto();" onmouseout="setAuto()">2</span> <span onclick="Mea(2);" onmouseover="clearAuto();" onmouseout="setAuto()">3</span> <span onclick="Mea(3);" onmouseover="clearAuto();" onmouseout="setAuto()">4</span> <span onclick="Mea(4);" onmouseover="clearAuto();" onmouseout="setAuto()">5</span> <span onclick="Mea(5);" onmouseover="clearAuto();" onmouseout="setAuto()">6</span> </div> </div> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20language%3D%22javascript%22%20type%3D%22text%2Fjavascript%22%3E%20%0D%0Avar%20n%3D0%3B%20%0D%0Avar%20showNum%20%3D%20document.getElementById(%22num%22)%3B%20%0D%0Avar%20showNums%20%3D%20document.getElementById(%22num%22).getElementsByTagName(%22span%22)%3B%20%0D%0Afunction%20Mea(value)%7B%20%0D%0An%3Dvalue%3B%20%0D%0AsetBg(value)%3B%20%0D%0Aplays(value)%3B%20%0D%0Acons(value)%3B%20%0D%0A%7D%20%0D%0Afunction%20setBg(value)%7B%20%0D%0Afor(var%20i%3D0%3Bi%3CshowNums.length%3Bi%2B%2B)%20%0D%0Aif(value%3D%3Di)%7B%20%0D%0AshowNum.getElementsByTagName(%22span%22)%5Bi%5D.className%3D'bigon'%3B%20%0D%0A%7D%20%0D%0Aelse%7B%20%0D%0AshowNum.getElementsByTagName(%22span%22)%5Bi%5D.className%3D'bigoff'%3B%20%0D%0A%7D%20%0D%0A%7D%20%0D%0Afunction%20plays(value)%7B%20%0D%0Atry%20%0D%0A%7B%20%0D%0Awith%20(fc)%20%0D%0A%7B%20%0D%0Afilters%5B0%5D.Apply()%3B%20%0D%0Afor(i%3D0%3Bi%3CshowNums.length%3Bi%2B%2B)i%3D%3Dvalue%3Fchildren%5Bi%5D.style.display%3D%22block%22%3Achildren%5Bi%5D.style.display%3D%22none%22%3B%20%0D%0Afilters%5B0%5D.play()%3B%20%0D%0A%7D%20%0D%0A%7D%20%0D%0Acatch(e)%20%0D%0A%7B%20%0D%0Avar%20divlist%20%3D%20document.getElementById(%22fc%22).getElementsByTagName(%22div%22)%3B%20%0D%0Afor(i%3D0%3Bi%3CshowNums.length%3Bi%2B%2B)%20%0D%0A%7B%20%0D%0Ai%3D%3Dvalue%3Fdivlist%5Bi%5D.style.display%3D%22block%22%3Adivlist%5Bi%5D.style.display%3D%22none%22%3B%20%0D%0A%7D%20%0D%0A%7D%20%0D%0A%7D%20%0D%0Afunction%20cons(value)%7B%20%0D%0Atry%20%0D%0A%7B%20%0D%0Awith%20(con)%20%0D%0A%7B%20%0D%0Afor(i%3D0%3Bi%3CshowNums.length%3Bi%2B%2B)i%3D%3Dvalue%3Fchildren%5Bi%5D.style.display%3D%22block%22%3Achildren%5Bi%5D.style.display%3D%22none%22%3B%20%0D%0A%7D%20%0D%0A%7D%20%0D%0Acatch(e)%20%0D%0A%7B%20%0D%0Avar%20divlist%20%3D%20document.getElementById(%22con%22).getElementsByTagName(%22div%22)%3B%20%0D%0Afor(i%3D0%3Bi%3CshowNums.length%3Bi%2B%2B)%20%0D%0A%7B%20%0D%0Ai%3D%3Dvalue%3Fdivlist%5Bi%5D.style.display%3D%22block%22%3Adivlist%5Bi%5D.style.display%3D%22none%22%3B%20%0D%0A%7D%20%0D%0A%7D%20%0D%0A%7D%20%0D%0Afunction%20setAuto()%7BautoStart%3DsetInterval(%22auto(n)%22%2C%205000)%7D%20%0D%0Afunction%20clearAuto()%7BclearInterval(autoStart)%7D%20%0D%0Afunction%20auto()%7B%20%0D%0An%2B%2B%3B%20%0D%0Aif(n%3EshowNums.length-1)n%3D0%3B%20%0D%0AMea(n)%3B%20%0D%0A%7D%20%0D%0Afunction%20sub()%7B%20%0D%0An--%3B%20%0D%0Aif(n%3C0)n%3DshowNums.length-1%3B%20%0D%0AMea(n)%3B%20%0D%0A%7D%20%0D%0AsetAuto()%3B%20%0D%0A%0D%0A%3C%2Fscript%3E"> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程