document.writeln("
"); document.writeln("
向上
"); document.writeln("
"); document.writeln(""); document.writeln("
"); document.writeln("
向下
"); document.writeln("
"); function $(e) {return document.getElementById(e);} var MyMar; var speed = 1; //速度,越大越慢 var spec = 1; //每次滚动的间距, 越大滚动越快 $('gotop').onmouseover = function() {MyMar=setInterval(gotop,speed);} $('gotop').onmouseout = function() {clearInterval(MyMar);} $('gobottom').onmouseover = function() {MyMar=setInterval(gobottom,speed);} $('gobottom').onmouseout = function() {clearInterval(MyMar);} function gotop() {$('talbe2').scrollTop-=spec;} function gobottom() {$('talbe2').scrollTop+=spec;}