資源描述:
《熱門javascript圖片文字向上滾動(dòng)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫(kù)。
1、functionMarquee(){this.ID=document.getElementById(arguments[0]);if(!this.ID){alert("aaa"+arguments[0]+"bbbb!");this.ID=-1;return;}this.Direction=this.Width=this.Height=this.DelayTime=this.WaitTime=this.CTL=this.StartID=this.Stop=this.MouseOver=0;this.Step=
2、1;this.Timer=30;this.DirectionArray={"top":0,"up":0,"bottom":1,"down":1,"left":2,"right":3};if(typeofarguments[1]=="number"
3、
4、typeofarguments[1]=="string")this.Direction=arguments[1];if(typeofarguments[2]=="number")this.Step=arguments[2];if(typeofarguments[3]=="number")this.Width=argum
5、ents[3];if(typeofarguments[4]=="number")this.Height=arguments[4];if(typeofarguments[5]=="number")this.Timer=arguments[5];if(typeofarguments[6]=="number")this.DelayTime=arguments[6];if(typeofarguments[7]=="number")this.WaitTime=arguments[7];if(typeofarguments[8]=="number")this.ScrollSt
6、ep=arguments[8];this.ID.style.overflow=this.ID.style.overflowX=this.ID.style.overflowY="hidden";this.ID.noWrap=true;this.IsNotOpera=(navigator.userAgent.toLowerCase().indexOf("opera")==-1);if(arguments.length>=7)this.Start();}Marquee.prototype.Start=function(){if(this.ID==-1)return;if
7、(this.WaitTime<800)this.WaitTime=800;if(this.Timer<20)this.Timer=20;if(this.Width==0)this.Width=parseInt(this.ID.style.width);if(this.Height==0)this.Height=parseInt(this.ID.style.height);if(typeofthis.Direction=="string")this.Direction=this.DirectionArray[this.Direction.toString().toL
8、owerCase()];this.HalfWidth=Math.round(this.Width/2);this.HalfHeight=Math.round(this.Height/2);this.BakStep=this.Step;this.ID.style.width=this.Width+"px";this.ID.style.height=this.Height+"px";if(typeofthis.ScrollStep!="number")this.ScrollStep=this.Direction>1?this.Width:this.Height;var
9、templateLeft="MSCLASS_TEMP_HTMLMSCLASS_TEMP_HTML
"
10、;vart