50分问个滚动效果的怪事,急急!
www.yilong.cc
问题如下,公司简介那里的滚动字幕有的时候是正常的,有的时候不正常(表现为上面留出一片空白)把版面搞坏了。就是换用最简单的marquee语言控制的时候依然是时好时坏。搞了两个小时无解,请各位帮忙。
滚动区代码
<table width="601" border="0" cellpadding="0" cellspacing="0" height="222">
<tr>
<td valign="top" width="302" align="center" > </td>
<td width="299" align="center" valign="top" background="Img/tdbackground5.gif">div id="icefable1">
<!-- #include file="gundong.asp" --></div>
</td>
</tr>
<script language="javascript">
marqueesHeight=180;
stopscroll=false;
with(icefable1){
style.width=0;
style.height=marqueesHeight;
style.overflowX="visible";
style.overflowY="hidden";
noWrap=true;
onmouseover=new Function("stopscroll=true");
onmouseout=new Function("stopscroll=false");
}
preTop=0; currentTop=180; stoptime=0;
icefable1.innerHTML+=icefable1.innerHTML;
function init_srolltext(){
icefable1.scrollTop=0;
setInterval("scrollUp()",10);
}
init_srolltext();
function scrollUp(){
if(stopscroll==true) return;
currentTop+=1;
if(currentTop==181)
{
stoptime+=1;
currentTop-=1;
if(stoptime==1)
{
currentTop=0;
stoptime=0;
}
}
else {
preTop=icefable1.scrollTop;
icefable1.scrollTop+=1;
if(preTop==icefable1.scrollTop){
icefable1.scrollTop=180;
icefable1.scrollTop+=1;
}
}
}
</script>
</table>