/** AutoScrollScreen.js [object]
* @description 双击鼠标滚动屏幕静态[static]对象
* IE 6.0, firefox 1.0, Opera 8.0 通过测试
* @author 闲耘 (HoToo)
* @author hotoo.cn@gmail.com
*
* @create 2006-6-15
*/
* @description 双击鼠标滚动屏幕静态[static]对象
* IE 6.0, firefox 1.0, Opera 8.0 通过测试
* @author 闲耘 (HoToo)
* @author hotoo.cn@gmail.com
*
* @create 2006-6-15
*/
var AutoScrollScreen = new Object( );
AutoScrollScreen.delay = 50;
AutoScrollScreen.start = function(){
AutoScrollScreen._timer =
setInterval('AutoScrollScreen.scroll()',
AutoScrollScreen.delay);
};
AutoScrollScreen._timer =
setInterval('AutoScrollScreen.scroll()',
AutoScrollScreen.delay);
};
AutoScrollScreen.stop = function(){
clearInterval(AutoScrollScreen._timer);
};
clearInterval(AutoScrollScreen._timer);
};
AutoScrollScreen.scroll = function(){
var _currentpos = document.body.scrollTop;
window .scroll( 0, ++_currentpos);
if (_currentpos != document.body.scrollTop){
this.stop();
}
};
var _currentpos = document.body.scrollTop;
window .scroll( 0, ++_currentpos);
if (_currentpos != document.body.scrollTop){
this.stop();
}
};
document.ondblclick = AutoScrollScreen.start;
document.onmousedown = AutoScrollScreen.stop;
document.onmousedown = AutoScrollScreen.stop;
没有评论:
发表评论