Why can't the image flow show after I copy a second piece of code on the home page?
Copy codeThe Code is as follows:
<Div align = "center">
<Table style = "TABLE-LAYOUT: fixed; border-collapse: collapse "cellSpacing = 0 cellPadding = 0 width = 760 border = 1 height =" 150 "bordercolor =" #1989D7 ">
<Tr>
& Lt; td height = "150" & gt;
<Div id = demo style = "OVERFLOW: hidden; WIDTH: 100%; HEIGHT: 150px">
<Table cellPadding = 0 align = left border = 0 cellspace = "0">
<Tr>
<Td id = demo1 vAlign = top> <! -- $ Latest image $ --> </td>
<Td id = demo2 vAlign = top> </td>
</Tr>
</Table>
</Div>
<SCRIPT>
Var speed = 25
Demo2.innerHTML = demo1.innerHTML
Function Marquee1 (){
If (demo2.offsetWidth-demo. scrollLeft <= 0)
Demo. scrollLeft-= demo1.offsetWidth
Else {
Demo. scrollLeft ++
}
}
Var MyMar = setInterval (Marquee1, speed)
Demo. onmouseover = function () {clearInterval (MyMar )}
Demo. onmouseout = function () {MyMar = setInterval (Marquee1, speed )}
</SCRIPT>
The two codes are identical, so conflicts occur. Simply modify another piece of code. The red mark must be modified.
Try:
Copy codeThe Code is as follows:
<! -- The second paragraph starts rolling the code to the right -->
<Div id = gundong style = "OVERFLOW: hidden; WIDTH: 568px; HEIGHT: 126px">
<Table cellPadding = 0 align = left border = 0 cellspace = "0">
<Tr>
<Td id = gundong1 vAlign = top>
<! -- {$ GetPicPhoto (1,126, 0, true, false, false, 90, 20, 0, true, 20)} --> </td>
<Td id = gundong2 vAlign = top> </td>
</Tr>
</Table>
</Div>
<Script>
Var speed = 25
Gundong2.innerHTML = gundong1.innerHTML
Gundong. scrollLeft = gundong. scrollWidth
Function Marquee1 (){
If (gundong. scrollLeft <= 0)
Gundong. scrollLeft + = gundong2.offsetWidth
Else {
Gundong. scrollLeft --
}
}
Var MyMar1 = setInterval (Marquee1, speed)
Gundong. onmouseover = function () {clearInterval (MyMar1 )}
Gundong. onmouseout = function () {MyMar1 = setInterval (Marquee1, speed )}
</Script>
<! -- The second paragraph scroll to the right to end the code -->