资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
多浏览器兼容的qq图片轮换效果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>js图片轮换效果代码_管理资源吧</title> </head> <body> <table class=bdc6 height=359 cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD vAlign=top> <table height=6 cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD></TD></TR></TBODY></TABLE> <table height=170 cellSpacing=0 cellPadding=0 width=150 align=center border=0> <TBODY> <TR> <TD vAlign=top height=170> <DIV id=bimg style="WIDTH: 150px; HEIGHT: 170px"> <DIV class=undis style="WIDTH: 150px; HEIGHT: 170px"><A href="http://news.qq.com/a/20080610/000271.htm" _ewebeditor_ta_href="http%3A%2F%2Fnews.qq.com%2Fa%2F20080610%2F000271.htm" target=_blank><IMG height=170 src="http://files.glzy8.com/upload/20080610123614199.jpg" _ewebeditor_ta_src="http%3A%2F%2Ffiles.glzy8.com%2Fupload%2F20080610123614199.jpg" width=150></A></DIV> <DIV class=dis style="WIDTH: 150px; HEIGHT: 170px"><A href="http://news.qq.com/a/20080609/001999.htm" _ewebeditor_ta_href="http%3A%2F%2Fnews.qq.com%2Fa%2F20080609%2F001999.htm" target=_blank><IMG height=170 src="http://files.glzy8.com/upload/20080610123618955.jpg" _ewebeditor_ta_src="http%3A%2F%2Ffiles.glzy8.com%2Fupload%2F20080610123618955.jpg" width=150></A></DIV> <DIV class=dis style="WIDTH: 150px; HEIGHT: 170px"><A href="http://news.qq.com/a/20080609/001901.htm" _ewebeditor_ta_href="http%3A%2F%2Fnews.qq.com%2Fa%2F20080609%2F001901.htm" target=_blank><IMG height=170 src="http://files.glzy8.com/upload/20080610123619426.jpg" _ewebeditor_ta_src="http%3A%2F%2Ffiles.glzy8.com%2Fupload%2F20080610123619426.jpg" width=150></A></DIV> </DIV></TD></TR></TBODY></TABLE> <table height=24 cellSpacing=0 cellPadding=0 width=150 align=center border=0> <TBODY> <TR> <TD class=f14 id=info width=227> <DIV class=dis>22吨重挖掘机</DIV> <DIV class=dis>中星九号直播</DIV> <DIV class=dis>考后表情</DIV> </TD> <TD width=59> <table id=simg cellSpacing=0 cellPadding=2 width="100%" align=right border=0> <TBODY> <TR align=middle> <TD class=s>1</TD> <TD>2</TD> <TD>3</TD> </TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3CSCRIPT%3E%20%0D%0Afunction%20%24(v)%7Breturn%20document.getElementById(v)%7D%20%0D%0Avar%20img%20%3D%20%24(%22bimg%22).getElementsByTagName(%22div%22)%3B%20%0D%0Avar%20td%20%3D%20%24(%22simg%22).getElementsByTagName(%22td%22)%3B%20%0D%0Avar%20text%20%3D%20%24(%22info%22).getElementsByTagName(%22div%22)%3B%20%0D%0Avar%20now%20%3D%201%3B%20%0D%0Avar%20count%20%3D%203%3B%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%E8%AE%BE%E7%BD%AE%E6%95%B0%E9%87%8F%20%0D%0Avar%20def%20%3D%200%3B%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%E9%BB%98%E8%AE%A4%E6%98%BE%E7%A4%BA%20%0D%0Avar%20speed%20%3D%201000%3B%20%20%20%20%20%20%20%20%2F%2F10%E7%A7%92%20%0D%0A%2F%2Finitialize%20%0D%0Afor(var%20i%3D0%3Bi%3Ccount%3Bi%2B%2B)%7B%20%0D%0A%20%20%20%20%2F%2Ftd%20%0D%0A%20%20%20%20td%5Bi%5D.name%20%3D%20i%3B%20%0D%0A%20%20%20%20td%5Bi%5D.className%20%3D%20%22%22%3B%20%0D%0A%20%20%20%20td%5Bi%5D.onclick%20%3D%20function%20()%7BchangeBar(this.name)%7D%20%0D%0A%20%20%20%20td%5Bi%5D.onmouseover%20%3D%20function()%7BclearAuto()%7D%20%0D%0A%20%20%20%20td%5Bi%5D.onmouseout%20%3D%20function()%7BsetAuto()%7D%20%0D%0A%20%20%20%20%2F%2Fimg%20%20%20%0D%0A%20%20%20%20img%5Bi%5D.style.display%20%3D%20%22none%22%3B%20%0D%0A%20%20%20%20img%5Bi%5D.onmouseover%20%3D%20function()%7BclearAuto()%7D%20%0D%0A%20%20%20%20img%5Bi%5D.onmouseout%20%3D%20function()%7BsetAuto()%7D%20%0D%0A%20%20%20%20%20%0D%0A%20%20%20%20%2F%2Ftext%20%20%0D%0A%20%20%20%20text%5Bi%5D.style.display%20%3D%20%22none%22%3B%20%0D%0A%20%20%20%20text%5Bi%5D.onmouseover%20%3D%20function()%7BclearAuto()%7D%20%0D%0A%20%20%20%20text%5Bi%5D.onmouseout%20%3D%20function()%7BsetAuto()%7D%20%0D%0A%0D%0A%7D%20%0D%0A%2F%2Fset%20default%20%0D%0Atd%5Bdef%5D.className%20%3D%20%22s%22%3B%20%0D%0Aimg%5Bdef%5D.style.display%20%3D%20%22block%22%3B%20%0D%0Atext%5Bdef%5D.style.display%20%3D%20%22block%22%3B%20%0D%0A%20%20%0D%0Afunction%20setClass(v)%7B%20%20%0D%0A%20%20%20%20for(var%20i%3D0%3Bi%3Ccount%3Bi%2B%2B)%20%0D%0A%20%20%20%20%20%20%20%20td%5Bi%5D.className%20%3D%20%22%22%3B%20%0D%0A%20%20%20%20td%5Bv%5D.className%20%3D%20%22s%22%3B%20%0D%0A%7D%20%20%20%0D%0Afunction%20setImg(v)%7B%20%20%20%20%20%0D%0A%20%20%20%20try%7B%20%0D%0A%20%20%20%20%20%20%20%20with%20(bimg)%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20filters%5B0%5D.Apply()%3B%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20for(var%20i%3D0%3Bi%3Ccount%3Bi%2B%2B)%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20img%5Bi%5D.style.display%20%3D%20%22none%22%3B%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20text%5Bi%5D.style.display%20%3D%20%22none%22%3B%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20img%5Bv%5D.style.display%20%3D%20%22block%22%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20text%5Bv%5D.style.display%20%3D%20%22block%22%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20filters%5B0%5D.play()%3B%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%7D%20%0D%0A%20%20%20%20catch(e)%7B%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20for(var%20i%3D0%3Bi%3Ccount%3Bi%2B%2B)%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20img%5Bi%5D.style.display%20%3D%20%22none%22%3B%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20text%5Bi%5D.style.display%20%3D%20%22none%22%3B%20%0D%0A%20%20%20%20%20%20%20%20%7D%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20img%5Bv%5D.style.display%20%3D%20%22block%22%3B%20%0D%0A%20%20%20%20%20%20%20%20text%5Bv%5D.style.display%20%3D%20%22block%22%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%7D%20%0D%0A%2F%2Fcontorl%20changed%20%0D%0Afunction%20changeBar(v)%7B%20%0D%0A%20%20%20%20setClass(v)%3B%20%0D%0A%20%20%20%20setImg(v)%3B%20%0D%0A%20%20%20%20now%3D%20v%2B1%3B%20%0D%0A%7D%20%20%0D%0A%2F%2Fset%20Auto%20%0D%0Avar%20auto%20%3D%20''%3B%20%0D%0Afunction%20setChange()%7B%20%0D%0A%20%20%20%20if(now%3Ccount)%7B%20%0D%0A%20%20%20%20%20%20%20%20changeBar(now)%3B%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20else%7B%20%0D%0A%20%20%20%20%20%20%20%20now%20%3D%200%3B%20%0D%0A%20%20%20%20%20%20%20%20changeBar(now)%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%7D%20%0D%0Afunction%20setAuto()%7Bauto%20%3D%20setInterval(%22setChange()%22%2C%20speed)%7D%20%0D%0Afunction%20clearAuto()%7BclearInterval(auto)%7D%20%0D%0AsetAuto()%3B%20%0D%0A%3C%2FSCRIPT%3E"> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程