Simple javascript text scroll up code
<! -Start-> <DIV id = marqueey>
<Table width = "476" border = "0" cellspacing = "0" cellpadding = "0">
<! -Start->
<! -List->
<Tr>
<Td width = "22" align = "center"> </td>
<Td height = "19" width = "450"> <a href = "" class = "tList" target = ""> code to scroll up text </a> <font class = fonts> </font> </td>
</Tr>
<Tr>
<Td colspan = 2 background = "images/line.gif" height = 3> </td>
</Tr>
<! -List->
<! -End->
</Table>
</DIV> <SCRIPT language = JavaScript>
MarqueeyHeight = 140; // defines the height.
Stopscroll = false;
With (marqueey ){
Style. width = 0;
Style. height = marqueeyHeight;
Style. overflowX = "visible ";
Style. overflowY = "hidden ";
NoWrap = true;
Onmouseover = new Function ("stopscroll = true ");
Onmouseout = new Function ("stopscroll = false ");
}
Document. write ('<div id = "templayer" style = "position: absolute; z-index: 1; visibility: hidden"> </div> ');
PreTop = 0; currentTop = 0;
Function init (){
Templayer. innerHTML = "";
While (templayer. offsetHeight <marqueeyHeight ){
Templayer. innerHTML + = marqueey. innerHTML;
}
Marqueey. innerHTML = templayer. innerHTML + templayer. innerHTML;
SetInterval ("scrollUp ()", 40); // controls the scrolling speed of www.111cn.net.
}
Document. body. onload = init;
Function scrollUp (){
If (stopscroll = true) return;
PreTop = marqueey. scrollTop;
Marqueey. scrollTop + = 1;
If (preTop = marqueey. scrollTop ){
Marqueey. scrollTop = templayer. offsetHeight-marqueeyHeight;
Marqueey. scrollTop + = 1;
}
}
</SCRIPT>
<! -End-> </td>
</Tr>
</Table>