标题:求双击鼠标网页会向下慢慢移动的代码.....
只看楼主
twtdd
Rank: 1
等 级:新手上路
帖 子:44
专家分:0
注 册:2008-6-12
 问题点数:0 回复次数:3 
求双击鼠标网页会向下慢慢移动的代码.....
求双击鼠标网页会向下慢慢移动的代码.....
搜索更多相关主题的帖子: 鼠标 网页 代码 
2008-06-27 14:52
hebingbing
Rank: 6Rank: 6
来 自:黄土高坡
等 级:贵宾
威 望:27
帖 子:3417
专家分:371
注 册:2007-10-22
得分:0 
脚本说明:
把如下代码加入<body>区域中
<script language="javascript" type="text/javascript">
<!--
 

var cntr=0
var intervalid

var max_height=500 //the height of the page
    //adjust the max_height with the height of your page
     //It scrolls about 25 pixels per second
function do_scroll() {

cntr+=6
self.scroll(0,cntr)
if(cntr >max_height) {
cntr =-5
}
//restart the scrolling
if(cntr<0){
cntr+=6
}

}
//stop the scroll
function clear_interval(){
clearInterval(intervalid)
return false
}

function loop_scroll(){
intervalid=setInterval("do_scroll()",250)
status="!!!!!!!!!!! MOUSEOVER TO STOP AUTOSCROLL,MOUSEOUT TO RESTART !!!!!!!!!!!!"
return false
}

//-->
</script>

<script language="javascript">
<!--
document.onmouseover=clear_interval
document.onmouseout=loop_scroll
-->
</script>
2008-06-27 16:38
twtdd
Rank: 1
等 级:新手上路
帖 子:44
专家分:0
注 册:2008-6-12
得分:0 
谢谢了
2008-06-29 10:56
twtdd
Rank: 1
等 级:新手上路
帖 子:44
专家分:0
注 册:2008-6-12
得分:0 
那请问有VB代码不其所长不用HTML的可不可以
2008-06-29 11:09



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-221579-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.759044 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved