双击页面滚动单击页面滚动停止的JAVAscript特效实现代码

<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>双击页面滚动单击页面滚动停止--志文工作室</title>

<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 align="center"><script type="text/javascript"><!--
google_ad_client = "pub-2830518914778771";
/* 468x60, 创建于 08-9-14 */
google_ad_slot = "6299149178";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</p>
 

双击鼠标左键 滚动

单击 停止

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center"> 

<p align="center">

</body>

</html>
点赞 (0)

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

Captcha Code