CopyCode The Code is as follows: <SCRIPT>
VaR speed = 20;/* the greater the speed, the slower the speed */
Document. getelementbyid ('www _ qpsh_com2 '). innerhtml = Document. getelementbyid ('www _ qpsh_com1'). innerhtml;
/* The two layers alternate back and forth */
Function marquee (){
If (document. getelementbyid ('www _ qpsh_com2 '). offsetWidth-document.getElementById ('www _ qpsh_com'). scrollleft <= 0)
Document. getelementbyid ('www _ qpsh_com '). scrollleft-= Document. getelementbyid ('www _ qpsh_com1'). offsetwidth;
Else {
Document. getelementbyid ('www _ qpsh_com '). scrollleft ++;
}
Document. getelementbyid ('My _ marquee_info '). innerhtml = '';
Document. getelementbyid ('My _ marquee_info '). innerhtml + = 'div. scrolltop:' + document. getelementbyid ('www _ qpsh_com '). scrollleft;
}
VaR mymar = setinterval (marquee, speed );
Www_qpsh_com.onmouseover = function () {clearinterval (mymar );}
Www_qpsh_com.onmouseout = function () {mymar = setinterval (marquee, speed );}
</SCRIPT>
DEMO code:Xmlns = "http://www.w3.org/1999/xhtml">
Training venue |
Casual tea |
Club Introduction |
Indoor Arena and horse room |
Mumachang |
|
|