直接用就行了
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<SCRIPT language=JavaScript>
var currentpos,timer;function initialize()
{
timer=setInterval("scrollwindow()",10);
}
function sc(){
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos != document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize
</script></head><body>
p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>
</body>
</html>
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<SCRIPT language=JavaScript>
var currentpos,timer;function initialize()
{
timer=setInterval("scrollwindow()",10);
}
function sc(){
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos != document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize
</script></head><body>
p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>
</body>
</html>
解决方案 »
- document.execCommand(”saveAs”) ie另存为 保存对话框问题
- 求一javascript函数可以验证文件名是否合法的
- js问题
- 怎样让iframe的滚动条自动到最底部呢???
- textarea赋了值后,我如何换行?
- 文本框中输入固定位数的字符串(字母+数字)后加逗号,求大侠帮助~
- 对JAVASCRIPT 操作OWC11里的PivotTable熟的请来帮帮我
- 我要在网页中加入一个可以画图(曲线图,柱形图,K线图)的控件,请问各位大虾哪里有? 必给分!
- IE10以下,JS加载XML文件返回403,(无法获取XML里面的东西)其他浏览器返回200,
- 表单的纵向,横向,全部的选择功能
- 怎样通过函数调用触发表单的onSubmit()函数
- 用VC编的ocx如何在ASP.net页面的JavaScript脚本里调用属性方法事件???
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<SCRIPT language=JavaScript>
var currentpos,timer;function initialize()
{
timer=setInterval("scrollwindow()",10);
}
function sc(){
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos != document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.onclick=initialize
</script></head><body>
p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>p<br>
</body>
</html>
上面代码单击滚动可以行,单击停止不行,滚屏到底自动重新滚动还是不行