资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
图片友情链接滚动 横向,带控制按钮
<title>友情链接滚动特效</title> <style> .roun .rounCenter_fh{width:248px;float:left;overflow:hidden;border-left:1px solid #D3D3D3;border-right:1px solid #D3D3D3;background-color: #FFFFFF;background-position: 193px top; height:133px; padding-top:8px;} .container, .container img{width:180px; height:50px;} .index_bank{width:250px; height:60px; background:url(http://files.glzy8.com/demoimg/200910//bank_back.gif) no- repeat; padding:30px 0 0 15px;} </style> <DIV class="roun right mT8px"> <div class="index_bank"> <table width="190px" border="0" cellspacing="0" cellpadding="0"> <tr> <td><input id="idPre" type="image" src="http://files.glzy8.com/demoimg/200910//bank_btn_left.gif" onFocus="this.blur()" /></td> <td><div class="container" id="idContainer2"> <table id="idSlider2" border="0" cellpadding="0" cellspacing="0"> <tr> <td><img src="http://files.glzy8.com/demoimg/200910//bank1.gif" _ewebeditor_ta_src="http%3A%2F%2Ffiles.glzy8.com%2Fdemoimg%2F200910%2F%2Fbank1.gif"/></a></td> <td><img src="http://files.glzy8.com/demoimg/200910//bank2.gif" _ewebeditor_ta_src="http%3A%2F%2Ffiles.glzy8.com%2Fdemoimg%2F200910%2F%2Fbank2.gif"/></a></td> <td><img src="http://files.glzy8.com/demoimg/200910//bank3.gif" _ewebeditor_ta_src="http%3A%2F%2Ffiles.glzy8.com%2Fdemoimg%2F200910%2F%2Fbank3.gif"/></a></td> <td><img src="http://files.glzy8.com/demoimg/200910//bank4.gif" _ewebeditor_ta_src="http%3A%2F%2Ffiles.glzy8.com%2Fdemoimg%2F200910%2F%2Fbank4.gif"/></a></td> <td><img src="http://files.glzy8.com/demoimg/200910//bank5.gif" _ewebeditor_ta_src="http%3A%2F%2Ffiles.glzy8.com%2Fdemoimg%2F200910%2F%2Fbank5.gif"/></a></td> <td><img src="http://files.glzy8.com/demoimg/200910//bank6.gif" _ewebeditor_ta_src="http%3A%2F%2Ffiles.glzy8.com%2Fdemoimg%2F200910%2F%2Fbank6.gif"/></a></td> <td><img src="http://files.glzy8.com/demoimg/200910//bank7.gif" _ewebeditor_ta_src="http%3A%2F%2Ffiles.glzy8.com%2Fdemoimg%2F200910%2F%2Fbank7.gif"/></a></td> </tr> </table> </div></td> <td><input id="idNext" type="image" src="http://files.glzy8.com/demoimg/200910//bank_btn_right.gif" onFocus="this.blur()" /></td> </tr> </table> </div> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%3E%20%0D%0Avar%20%24%20%3D%20function%20(id)%20%7B%20%0D%0A%20%20%20%20return%20%22string%22%20%3D%3D%20typeof%20id%20%3F%20document.getElementById(id)%20%3A%20id%3B%20%0D%0A%7D%3B%20%0D%0Avar%20Extend%20%3D%20function(destination%2C%20source)%20%7B%20%0D%0A%20%20%20%20for%20(var%20property%20in%20source)%20%7B%20%0D%0A%20%20%20%20%20%20%20%20destination%5Bproperty%5D%20%3D%20source%5Bproperty%5D%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%20%20%20%20return%20destination%3B%20%0D%0A%7D%20%0D%0Avar%20CurrentStyle%20%3D%20function(element)%7B%20%0D%0A%20%20%20%20return%20element.currentStyle%20%7C%7C%20document.defaultView.getComputedStyle(element%2C%20null)%3B%20%0D%0A%7D%20%0D%0Avar%20Bind%20%3D%20function(object%2C%20fun)%20%7B%20%0D%0A%20%20%20%20var%20args%20%3D%20Array.prototype.slice.call(arguments).slice(2)%3B%20%0D%0A%20%20%20%20return%20function()%20%7B%20%0D%0A%20%20%20%20%20%20%20%20return%20fun.apply(object%2C%20args.concat(Array.prototype.slice.call(arguments)))%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%7D%20%0D%0Avar%20Tween%20%3D%20%7B%20%0D%0A%20%20%20%20Quart%3A%20%7B%20%0D%0A%20%20%20%20%20%20%20%20easeOut%3A%20function(t%2Cb%2Cc%2Cd)%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20-c%20*%20((t%3Dt%2Fd-1)*t*t*t%20-%201)%20%2B%20b%3B%20%0D%0A%20%20%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%7D%2C%20%0D%0A%20%20%20%20Back%3A%20%7B%20%0D%0A%20%20%20%20%20%20%20%20easeOut%3A%20function(t%2Cb%2Cc%2Cd%2Cs)%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(s%20%3D%3D%20undefined)%20s%20%3D%201.70158%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20c*((t%3Dt%2Fd-1)*t*((s%2B1)*t%20%2B%20s)%20%2B%201)%20%2B%20b%3B%20%0D%0A%20%20%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%7D%2C%20%0D%0A%20%20%20%20%20Bounce%3A%20%7B%20%0D%0A%20%20%20%20%20%20%20%20easeOut%3A%20function(t%2Cb%2Cc%2Cd)%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20((t%2F%3Dd)%20%3C%20(1%2F2.75))%20%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20c*(7.5625*t*t)%20%2B%20b%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(t%20%3C%20(2%2F2.75))%20%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20c*(7.5625*(t-%3D(1.5%2F2.75))*t%20%2B%20.75)%20%2B%20b%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(t%20%3C%20(2.5%2F2.75))%20%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20c*(7.5625*(t-%3D(2.25%2F2.75))*t%20%2B%20.9375)%20%2B%20b%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20c*(7.5625*(t-%3D(2.625%2F2.75))*t%20%2B%20.984375)%20%2B%20b%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%7D%20%0D%0A%7D%20%0D%0A%2F%2F%E5%AE%B9%E5%99%A8%E5%AF%B9%E8%B1%A1%2C%E6%BB%91%E5%8A%A8%E5%AF%B9%E8%B1%A1%2C%E5%88%87%E6%8D%A2%E6%95%B0%E9%87%8F%20%0D%0Avar%20SlideTrans%20%3D%20function(container%2C%20slider%2C%20count%2C%20options)%20%7B%20%0D%0A%20%20%20%20this._slider%20%3D%20%24(slider)%3B%20%0D%0A%20%20%20%20this._container%20%3D%20%24(container)%3B%2F%2F%E5%AE%B9%E5%99%A8%E5%AF%B9%E8%B1%A1%20%0D%0A%20%20%20%20this._timer%20%3D%20null%3B%2F%2F%E5%AE%9A%E6%97%B6%E5%99%A8%20%0D%0A%20%20%20%20this._count%20%3D%20Math.abs(7)%3B%2F%2F%E5%88%87%E6%8D%A2%E6%95%B0%E9%87%8F%20%0D%0A%20%20%20%20this._target%20%3D%200%3B%2F%2F%E7%9B%AE%E6%A0%87%E5%80%BC%20%0D%0A%20%20%20%20this._t%20%3D%20this._b%20%3D%20this._c%20%3D%200%3B%2F%2Ftween%E5%8F%82%E6%95%B0%20%0D%0A%20%20%20%20this.Index%20%3D%200%3B%2F%2F%E5%BD%93%E5%89%8D%E7%B4%A2%E5%BC%95%20%0D%0A%20%20%20%20this.SetOptions(options)%3B%20%20%20%20%20%0D%0A%20%20%20%20this.Auto%20%3D%20!!this.options.Auto%3B%20%0D%0A%20%20%20%20this.Duration%20%3D%20Math.abs(this.options.Duration)%3B%20%0D%0A%20%20%20%20this.Time%20%3D%20Math.abs(this.options.Time)%3B%20%0D%0A%20%20%20%20this.Pause%20%3D%20Math.abs(this.options.Pause)%3B%20%0D%0A%20%20%20%20this.Tween%20%3D%20this.options.Tween%3B%20%0D%0A%20%20%20%20this.onStart%20%3D%20this.options.onStart%3B%20%0D%0A%20%20%20%20this.onFinish%20%3D%20this.options.onFinish%3B%20%0D%0A%20%20%20%20%20%0D%0A%20%20%20%20var%20bVertical%20%3D%20!!this.options.Vertical%3B%20%0D%0A%20%20%20%20this._css%20%3D%20bVertical%20%3F%20%22left%22%20%3A%20%22left%22%3B%2F%2F%E6%96%B9%E5%90%91%20%0D%0A%20%20%20%20%20%0D%0A%20%20%20%20%2F%2F%E6%A0%B7%E5%BC%8F%E8%AE%BE%E7%BD%AE%20%0D%0A%20%20%20%20var%20p%20%3D%20CurrentStyle(this._container).position%3B%20%0D%0A%20%20%20%20p%20%3D%3D%20%22relative%22%20%7C%7C%20p%20%3D%3D%20%22absolute%22%20%7C%7C%20(this._container.style.position%20%3D%20%22relative%22)%3B%20%0D%0A%20%20%20%20this._container.style.overflow%20%3D%20%22hidden%22%3B%20%0D%0A%20%20%20%20this._slider.style.position%20%3D%20%22absolute%22%3B%20%0D%0A%20%20%20%20%20%0D%0A%20%20%20%20this.Change%20%3D%20this.options.Change%20%3F%20this.options.Change%20%3A%20%0D%0A%20%20%20%20%20%20%20%20this._slider%5BbVertical%20%3F%20%22offsetHeight%22%20%3A%20%22offsetWidth%22%5D%20%2F%20this._count%3B%20%0D%0A%7D%3B%20%0D%0ASlideTrans.prototype%20%3D%20%7B%20%0D%0A%2F%2F%E8%AE%BE%E7%BD%AE%E9%BB%98%E8%AE%A4%E5%B1%9E%E6%80%A7%20%0D%0ASetOptions%3A%20function(options)%20%7B%20%0D%0A%20%20%20%20this.options%20%3D%20%7B%2F%2F%E9%BB%98%E8%AE%A4%E5%80%BC%20%0D%0A%20%20%20%20%20%20%20%20Vertical%3A%20%20%20%20true%2C%2F%2F%E6%BB%9A%E5%8A%A8%E6%96%B9%E5%90%91%EF%BC%8C%E8%BF%99%E9%87%8C%E6%98%AF%E5%9E%82%E7%9B%B4%EF%BC%8C%E5%B7%B2%E5%9B%BA%E5%AE%9A%EF%BC%8C%E4%B8%94%E4%B8%8D%E8%83%BD%E4%BF%AE%E6%94%B9%EF%BC%89%20%0D%0A%20%20%20%20%20%20%20%20Auto%3A%20%20%20%20%20%20%20%20true%2C%2F%2F%E6%98%AF%E5%90%A6%E8%87%AA%E5%8A%A8%20%0D%0A%20%20%20%20%20%20%20%20Change%3A%20%20%20%20%20%20%20%200%2C%2F%2F%E6%94%B9%E5%8F%98%E9%87%8F%20%0D%0A%20%20%20%20%20%20%20%20Duration%3A%20%20%20%2050%2C%2F%2F%E6%BB%91%E5%8A%A8%E6%8C%81%E7%BB%AD%E6%97%B6%E9%97%B4%20%0D%0A%20%20%20%20%20%20%20%20Time%3A%20%20%20%20%20%20%20%2010%2C%2F%2F%E6%BB%91%E5%8A%A8%E5%BB%B6%E6%97%B6%20%0D%0A%20%20%20%20%20%20%20%20Pause%3A%20%20%20%20%20%20%20%202000%2C%2F%2F%E5%81%9C%E9%A1%BF%E6%97%B6%E9%97%B4(Auto%E4%B8%BAtrue%E6%97%B6%E6%9C%89%E6%95%88)%20%0D%0A%20%20%20%20%20%20%20%20onStart%3A%20%20%20%20function()%7B%7D%2C%2F%2F%E5%BC%80%E5%A7%8B%E8%BD%AC%E6%8D%A2%E6%97%B6%E6%89%A7%E8%A1%8C%20%0D%0A%20%20%20%20%20%20%20%20onFinish%3A%20%20%20%20function()%7B%7D%2C%2F%2F%E5%AE%8C%E6%88%90%E8%BD%AC%E6%8D%A2%E6%97%B6%E6%89%A7%E8%A1%8C%20%0D%0A%20%20%20%20%20%20%20%20Tween%3A%20%20%20%20%20%20%20%20Tween.Quart.easeOut%2F%2Ftween%E7%AE%97%E5%AD%90%20%0D%0A%20%20%20%20%7D%3B%20%0D%0A%20%20%20%20Extend(this.options%2C%20options%20%7C%7C%20%7B%7D)%3B%20%0D%0A%7D%2C%20%0D%0A%2F%2F%E5%BC%80%E5%A7%8B%E5%88%87%E6%8D%A2%20%0D%0ARun%3A%20function(index)%20%7B%20%0D%0A%20%20%20%20%2F%2F%E4%BF%AE%E6%AD%A3index%20%0D%0A%20%20%20%20index%20%3D%3D%20undefined%20%26%26%20(index%20%3D%20this.Index)%3B%20%0D%0A%20%20%20%20index%20%3C%200%20%26%26%20(index%20%3D%20this._count%20-%201)%20%7C%7C%20index%20%3E%3D%20this._count%20%26%26%20(index%20%3D%200)%3B%20%0D%0A%20%20%20%20%2F%2F%E8%AE%BE%E7%BD%AE%E5%8F%82%E6%95%B0%20%0D%0A%20%20%20%20this._target%20%3D%20-Math.abs(this.Change)%20*%20(this.Index%20%3D%20index)%3B%20%0D%0A%20%20%20%20this._t%20%3D%200%3B%20%0D%0A%20%20%20%20this._b%20%3D%20parseInt(CurrentStyle(this._slider)%5Bthis.options.Vertical%20%3F%20%22top%22%20%3A%20%22left%22%5D)%3B%20%0D%0A%20%20%20%20this._c%20%3D%20this._target%20-%20this._b%3B%20%0D%0A%20%20%20%20%20%0D%0A%20%20%20%20this.onStart()%3B%20%0D%0A%20%20%20%20this.Move()%3B%20%0D%0A%7D%2C%20%0D%0A%2F%2F%E7%A7%BB%E5%8A%A8%20%0D%0AMove%3A%20function()%20%7B%20%0D%0A%20%20%20%20clearTimeout(this._timer)%3B%20%0D%0A%20%20%20%20%2F%2F%E6%9C%AA%E5%88%B0%E8%BE%BE%E7%9B%AE%E6%A0%87%E7%BB%A7%E7%BB%AD%E7%A7%BB%E5%8A%A8%E5%90%A6%E5%88%99%E8%BF%9B%E8%A1%8C%E4%B8%8B%E4%B8%80%E6%AC%A1%E6%BB%91%E5%8A%A8%20%0D%0A%20%20%20%20if%20(this._c%20%26%26%20this._t%20%3C%20this.Duration)%20%7B%20%0D%0A%20%20%20%20%20%20%20%20this.MoveTo(Math.round(this.Tween(this._t%2B%2B%2C%20this._b%2C%20this._c%2C%20this.Duration)))%3B%20%0D%0A%20%20%20%20%20%20%20%20this._timer%20%3D%20setTimeout(Bind(this%2C%20this.Move)%2C%20this.Time)%3B%20%0D%0A%20%20%20%20%7Delse%7B%20%0D%0A%20%20%20%20%20%20%20%20this.MoveTo(this._target)%3B%20%0D%0A%20%20%20%20%20%20%20%20this.Auto%20%26%26%20(this._timer%20%3D%20setTimeout(Bind(this%2C%20this.Next)%2C%20this.Pause))%3B%20%0D%0A%20%20%20%20%7D%20%0D%0A%7D%2C%20%0D%0A%2F%2F%E7%A7%BB%E5%8A%A8%E5%88%B0%20%0D%0AMoveTo%3A%20function(i)%20%7B%20%0D%0A%20%20%20%20this._slider.style%5Bthis._css%5D%20%3D%20i%20%2B%20%22px%22%3B%20%0D%0A%7D%2C%20%0D%0A%2F%2F%E4%B8%8B%E4%B8%80%E4%B8%AA%20%0D%0ANext%3A%20function()%20%7B%20%0D%0A%20%20%20%20this.Run(%2B%2Bthis.Index)%3B%20%0D%0A%7D%2C%20%0D%0A%2F%2F%E4%B8%8A%E4%B8%80%E4%B8%AA%20%0D%0APrevious%3A%20function()%20%7B%20%0D%0A%20%20%20%20this.Run(--this.Index)%3B%20%0D%0A%7D%2C%20%0D%0A%2F%2F%E5%81%9C%E6%AD%A2%20%0D%0AStop%3A%20function()%20%7B%20%0D%0A%20%20%20%20clearTimeout(this._timer)%3B%20this.MoveTo(this._target)%3B%20%0D%0A%7D%20%0D%0A%7D%3B%20%0D%0Avar%20forEach%20%3D%20function(array%2C%20callback%2C%20thisObject)%7B%20%0D%0A%20%20%20%20if(array.forEach)%7B%20%0D%0A%20%20%20%20%20%20%20%20array.forEach(callback%2C%20thisObject)%3B%20%0D%0A%20%20%20%20%7Delse%7B%20%0D%0A%20%20%20%20%20%20%20%20for%20(var%20i%20%3D%200%2C%20len%20%3D%20array.length%3B%20i%20%3C%20len%3B%20i%2B%2B)%20%7B%20callback.call(thisObject%2C%20array%5Bi%5D%2C%20i%2C%20array)%3B%20%7D%20%0D%0A%20%20%20%20%7D%20%0D%0A%7D%20%0D%0Avar%20st%20%3D%20new%20SlideTrans(%22idContainer2%22%2C%20%22idSlider2%22%2C%203%2C%20%7B%20Vertical%3A%20false%20%7D)%3B%20%0D%0Avar%20nums%20%3D%20%5B%5D%3B%20%0D%0AforEach(nums%2C%20function(o%2C%20i)%7B%20%0D%0A%20%20%20%20o.onmouseover%20%3D%20function()%7B%20o.className%20%3D%20%22on%22%3B%20st.Auto%20%3D%20false%3B%20st.Run(i)%3B%20%7D%20%0D%0A%20%20%20%20o.onmouseout%20%3D%20function()%7B%20o.className%20%3D%20%22%22%3B%20st.Auto%20%3D%20true%3B%20st.Run()%3B%20%7D%20%0D%0A%7D)%20%0D%0A%2F%2F%E8%AE%BE%E7%BD%AE%E6%8C%89%E9%92%AE%E6%A0%B7%E5%BC%8F%20%0D%0Ast.onStart%20%3D%20function()%7B%20%0D%0A%20%20%20%20forEach(nums%2C%20function(o%2C%20i)%7B%20o.className%20%3D%20st.Index%20%3D%3D%20i%20%3F%20%22on%22%20%3A%20%22%22%3B%20%7D)%20%0D%0A%7D%20%0D%0A%24(%22idNext%22).onclick%20%3D%20function()%7B%20st.Next()%3B%20%7D%20%0D%0A%24(%22idPre%22).onclick%20%3D%20function()%7B%20st.Previous()%3B%20%7D%20%0D%0Ast.Run()%3B%20%0D%0A%3C%2Fscript%3E">
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程