SoFunction
Updated on 2025-03-01

Use js to achieve the upward and downward scrolling effect of controlling content

<SCRIPT language=JavaScript1.2>
iens6=||
ns4=

//specify speed of scroll (greater=faster)
var speed=10

if (iens6){
('<div  style="position:relative;width:600;height:430;border:0px solid black;overflow:hidden">')
('<div  style="position:absolute;width:590;left:0;top:0">')
}
</SCRIPT>
<SCRIPT language=JavaScript1.2>
if (iens6)
('</div></div>')
</SCRIPT>
<SCRIPT language=JavaScript1.2>
if (iens6){
var crossobj=? ("content") : 
var contentheight=
}
else if (ns4){
var crossobj=
var contentheight=
}

function movedown(){
if (iens6&&parseInt()>=(contentheight*(-1)+100))
=parseInt()-speed
else if (ns4&&>=(contentheight*(-1)+100))
-=speed
movedownvar=setTimeout("movedown()",100)
}

function moveup(){
if (iens6&&parseInt()<=0)
=parseInt()+speed
else if (ns4&&<=0)
+=speed
moveupvar=setTimeout("moveup()",100)

}

function getcontent_height(){
if (iens6)
contentheight=
else if (ns4)
="show"
}
=getcontent_height
</SCRIPT>