<script type="text/javascript">
function addEventSimple(obj,evt,fn){
if(obj.addEventListener){
obj.addEventListener(evt,fn,false);
}else if(obj.attachEvent){
obj.attachEvent('on'+evt,fn);
}}
addEventSimple(content,'dblclick',scroInit);
var status = 0;
var scroInterval;
function scroInit(){
if(status==0){
//非滚动,进入滚动状态
scroInterval = setInterval("scro()",100);
//改变状态
status=1;}
else{
//正在滚动,停止滚动
clearInterval(scroInterval);
//改变状态
status = 0; }
}
function scro(){
//不要使用document.body
document.documentElement.scrollTop++;
}
</script>
function addEventSimple(obj,evt,fn){
if(obj.addEventListener){
obj.addEventListener(evt,fn,false);
}else if(obj.attachEvent){
obj.attachEvent('on'+evt,fn);
}}
addEventSimple(content,'dblclick',scroInit);
var status = 0;
var scroInterval;
function scroInit(){
if(status==0){
//非滚动,进入滚动状态
scroInterval = setInterval("scro()",100);
//改变状态
status=1;}
else{
//正在滚动,停止滚动
clearInterval(scroInterval);
//改变状态
status = 0; }
}
function scro(){
//不要使用document.body
document.documentElement.scrollTop++;
}
</script>