DHTML实现可控制的页面内滚动区域

 首先,我们在样式表里加入“.opacity {FILTER: alpha(opacity=100)”,看下面!
以下是引用片段:

<style type="text/css"> 
<!-- 
.opacity {FILTER: alpha(opacity=100)} 
--> 
</style> 

然后在html代码中加入: 

<script> 
function movstar(a,time){ 
movx=setInterval("mov("+a+")",time) 

function movover(){ 
clearInterval(movx) 

function mov(a){ 
scrollx=new_date.document.body.scrollLeft 
scrolly=new_date.document.body.scrollTop 
scrolly=scrolly+a 
new_date.window.scroll(scrollx,scrolly) 

function o_down(theobject){ 
object=theobject 
while(object.filters.alpha.opacity>60){ 
object.filters.alpha.opacity+=-10} 

function o_up(theobject){ 
object=theobject 
while(object.filters.alpha.opacity<100){ 
object.filters.alpha.opacity+=10} 

function wback(){ 
if(new_date.history.length==0){window.history.back()} 
else{new_date.history.back()} 

</script> 


然后在向上箭头图片的代码中加入“class="opacity" onMouseDown=movover();movstar(-3,2) onMouseOut=movover();o_up(this) onMouseOver=movstar(-1,20);o_down(this) onMouseUp=movover();movstar(-1,20) alt="点住不放可以快速向上滚动"”。
 

你可能感兴趣的:(职场,DHTML,休闲,页面内滚动)