[求助]代码问题
帮忙解释一下这段代码,另请给改一下这个代码能不能改成向左滚动显示图片<script language=JavaScript1.2>
var marqueewidth=150
var marqueeheight=170
//设置marquee的速度
var speed=1
//设置marquee的显示内容
var marqueecontents='<font font-size:9pt><%rs.open "select * from ggl order by addtime desc",conn,1,1
if rs.recordcount<1 then
response.Write(".暂时没有公告信息!")
else
do while not rs.eof
if rs("content")<>"" then
response.Write(".<a href=ggl_browse.asp?id="&rs("id")&" target=_blank>"&rs("title")&"</a><br><br>")
else
response.Write(".<a href="&rs("filepath")&" target=_blank>"&rs("title")&"</a><br><br>")
end if
rs.movenext
loop
end if
rs.close%><br></font>'
if (document.all)
document.write('<marquee onmouseover=this.stop() onmouseout=this.start() direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheight+'">'+marqueecontents+'</marquee>')
function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.write(marqueecontents)
document.cmarquee01.document.cmarquee02.document.close()
thelength=document.cmarquee01.document.cmarquee02.document.height
scrollit()
}
function scrollit(){
if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){
document.cmarquee01.document.cmarquee02.top-=speed
setTimeout("scrollit()",100)
}
else{
document.cmarquee01.document.cmarquee02.top=marqueeheight
scrollit()
}
}
</script>