JS连续向上滚动代码
<SCRIPT language=JavaScript>
<!--
try{
var marqueesHeight = 58;
var stopscroll = false;
var scrollElem = document.getElementById("icefable1");
with(scrollElem){
style.width = 480;
style.height = marqueesHeight;
style.overflow = 'hidden';
noWrap = true;
}
scrollElem.onmouseover = new Function('stopscroll = true');
scrollElem.onmouseout = new Function('stopscroll = false');
var preTop = 0;
var currentTop = 0;
var stoptime = 0;
var leftElem = document.getElementById("box16left");
scrollElem.appendChild(leftElem.cloneNode(true));
init_srolltext();
}catch(e) {}
function init_srolltext(){
scrollElem.scrollTop = 0;
setInterval('scrollUp()', 15);
}
function scrollUp(){
if(stopscroll) return;
currentTop += 1;
if(currentTop == 22) {
stoptime += 1;
currentTop -= 1;
if(stoptime == 100) {
currentTop = 0;
stoptime = 0;
}
}else{
preTop = scrollElem.scrollTop;
scrollElem.scrollTop += 2;
if(preTop == scrollElem.scrollTop){
scrollElem.scrollTop = 0;
scrollElem.scrollTop += 2;
}
}
}
//-->
</SCRIPT>