- <Div id = "imgbox" style = "height: 110px; width: 600px; overflow: hidden;">
- <Div id = "imgbox1" style = "float: Left; width: 1000%">
- </Div>
- <Div id = "imgbox2" style = "float: Left" mce_style = "float: Left"> </div>
- </Div>
<Div id = "imgbox" style = "height: 110px; width: 600px; overflow: hidden;"> <br/> <Div id = "imgbox1" style = "float: left; width: 1000% "> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> </div> <br/> <Div id = "imgbox2" style = "float: left "mce_style =" float: Left "> </div> <br/> </div>
[JavaScript]
View plaincopyprint?
- <MCE: Script Type = "text/JavaScript"> <! --
- VaR speed = 30;
- VaR imgbox = Document. getelementbyid ("imgbox ");
- VaR imgbox1 = Document. getelementbyid ("imgbox1 ");
- VaR imgbox2 = Document. getelementbyid ("imgbox2 ");
- Imgbox2.innerhtml = imgbox1.innerhtml;
- Function marquee (){
- If (imgbox2.offsetwidth-imgbox. scrollleft <= 0)
- Imgbox. scrollleft-= imgbox1.offsetwidth;
- Else {
- Imgbox. scrollleft ++;
- }
- }
- VaR mymar = setinterval (marquee, speed );
- Imgbox. onmouseover = function () {clearinterval (mymar )}
- Imgbox. onmouseout = function () {mymar = setinterval (marquee, speed )}
- // --> </MCE: SCRIPT>
<MCE: Script Type = "text/JavaScript"> <! -- <Br/> var speed = 30; <br/> var imgbox = document. getelementbyid ("imgbox"); <br/> var imgbox1 = document. getelementbyid ("imgbox1"); <br/> var imgbox2 = document. getelementbyid ("imgbox2"); <br/> imgbox2.innerhtml = imgbox1.innerhtml; <br/> function marquee () {<br/> If (imgbox2.offsetwidth-imgbox. scrollleft <= 0) <br/> imgbox. scrollleft-= imgbox1.offsetwidth; <br/> else {<br/> imgbox. scrollleft ++; <br/>}< br/> var mymar = setinterval (marquee, speed); <br/> imgbox. onmouseover = function () {clearinterval (mymar)} <br/> imgbox. onmouseout = function () {mymar = setinterval (marquee, speed)} <br/> // --> </MCE: SCRIPT>
Share: