<script>
var currentpos, timer;
function initialize() {
timer = setInterval("scrollwindow()", 60);
}
function sc() {
clearInterval(timer);
}
function scrollwindow() {
var scrollPos;
if (typeof window.pageYOffset != 'undefined') {
scrollPos = window.pageYOffset;
} else if (typeof document.compatMode != 'undefined'
&& document.compatMode != 'BackCompat') {
scrollPos = document.documentElement.scrollTop;
} else if (typeof document.body != 'undefined') {
scrollPos = document.body.scrollTop;
}
currentpos = scrollPos;
window.scroll(0, ++currentpos);
if (currentpos == scrollPos) {
//sc();
}
}
document.onmousedown = sc;
document.ondblclick = initialize;
timer = setInterval("scrollwindow()", 60);
</script>
页面加载之后缓慢下滑,点击后停止下滑