1. Scroll up
<Div id = "ntice" style = "overflow: hidden; width: 275px; Height: 196px; margin-top: 4px;">
<Div id = "ntice1">
<Ul>
<Li> content </LI>
</Ul>
</Div>
<Div id = "ntice2"> </div>
</Div>
<Script language = "JavaScript" type = "text/JavaScript">
VaR speed = 50
Ntice2.innerhtml = ntice1.innerhtml
Function marquee (){
If (ntice2.offsettop-ntice. scrolltop <= 0)
Ntice. scrolltop-= ntice1.offsetheight
Else {
Ntice. scrolltop ++
}
}
VaR mymar = setinterval (marquee, speed)
Ntice. onmouseover = function () {clearinterval (mymar )}
Ntice. onmouseout = function () {mymar = setinterval (marquee, speed )}
</SCRIPT>
2. Left scroll
<Div id = "Demo" style = "overflow: hidden; width: 850px; Height: 100px;">
<Table>
<Tr>
<TD id = "demo1">
<Table>
<Tr>
<TD> scrolling content </TD>
<Tr>
</Table>
</TD>
<TD id = "demo2"> </TD>
</Tr>
</Table>
</Div>
<Script language = "JavaScript" type = "text/JavaScript">
VaR speed = 30
Demo2.innerhtml = demo1.innerhtml
Function marquee (){
If (demo2.offsetwidth-demo. scrollleft <= 0)
Demo. scrollleft-= demo1.offsetwidth
Else {
Demo. scrollleft ++
}
}
VaR mymar = setinterval (marquee, speed)
Demo. onmouseover = function () {clearinterval (mymar )}
Demo. onmouseout = function () {mymar = setinterval (marquee, speed )}
</SCRIPT>