前提一:页面内容必须超过一屏
前提二:必须去掉HTML标记中的<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
源代码如下:
<SCRIPT language=javascript>
try {
if (top.document.domain != self.document.domain
&& is.ie && is.v < 6) {
top.location.replace(self.location.href);
}
} catch(e) {
if (top != self) {
top.location.replace(self.location.href);
}
}
var currentpos,timer;
function initialize()
{
timer=setInterval("scrollwindow()",50);
}
function sc(){
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos != document.body.scrollTop)
sc();
}
document.οnmοusedοwn=sc
document.οndblclick=initialize
</SCRIPT>