5、自动滚屏特效代码

5、自动滚屏特效代码

<html>

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>新建网页 1</title>

</head>

 

<body>

<!--将以下代码加入HTML<Body></Body>之间-->

<script language="JavaScript1.2">

 

var speed=1

var currentpos=0,alt=1,curpos1=0,curpos2=-1

function initialize(){

startit()

}

function scrollwindow(){

if (document.all)

temp=document.body.scrollTop

else

temp=window.pageYOffset

if (alt==0)

alt=1

else

alt=0

if (alt==0)

curpos1=temp

else

curpos2=temp

if (curpos1!=curpos2){

if (document.all)

currentpos=document.body.scrollTop+speed

else

currentpos=window.pageYOffset+speed

window.scroll(0,currentpos)

}

else{

currentpos=0

window.scroll(0,currentpos)

}

}

function startit(){

setInterval("scrollwindow()",10)

}

window.onload=initialize

</script>

<SCRIPT type="text/javascript" src=""></SCRIPT>

<SCRIPT language="JavaScript">

<!--

BaiduWriteAD("zouwenyedg","3");

//-->

</SCRIPT>

 

 

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p>1111111111111111</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p> </p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p> </p>

<p>1</p>

<p>1</p>

<p> </p>

<p>1</p>

<p>1</p>

<p>1</p>

<p> </p>

<p> </p>

<p>1</p>

<p> </p>

<p>1</p>

<p>1</p>

<p> </p>

<p>1</p>

<p>1</p>

<p> </p>

<p> </p>

<p> </p>

<p>1</p>

 

 

</body>

 

</html>

 

</body>

 

</html>

 

Write a comment

Comments: 0