|
藍森林 http://www.lslnet.com 2006年8月25日 8:28
[急]請問藍色頂部的文字滾動廣告怎樣做?
精華里找不到 ...
搜索了也找不到 ...
哪位曉得? ........
急用 ......... |
.......... 是不是問題太淺了? |
隔一段時間滾一段字:
[html]
<table><tr><td>
<div id="icefable1" style="width:500;">
<TABLE cellSpacing=0 cellPadding=5 width=580 border=0>
<TR>
<TD><A href= target=_blank>link</A></TD>
<TD><A href= target=_blank>link</A></TD>
<TD><A href= target=_blank>link</A></TD>
</TR>
<TR>
<TD><A href= target=_blank>link</A></TD>
<TD><A href= target=_blank>link</A></TD>
<TD><A href= target=_blank>link</A></TD>
</TR>
<TR>
<TD><A href= target=_blank>link</A></TD>
<TD><A href= target=_blank>link</A></TD>
<TD><A href= target=_blank>link</A></TD>
</TR>
<TR>
<TD><A href= target=_blank>link</A></TD>
<TD><A href= target=_blank>link</A></TD>
<TD><A href= target=_blank>link</A></TD>
</TR>
</TABLE>
</div>
<div id="icefable2" style="position:absolute;z-index:1;visibility:hidden"></div></td></tr></table>
<script>
marqueesHeight=25;
stopscroll=false;
icefable1.scrollTop=0;
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=0; stoptime=0;
function init_srolltext(){
icefable2.innerHTML="";
icefable2.innerHTML+=icefable1.innerHTML;
icefable1.innerHTML=icefable2.innerHTML+icefable2.innerHTML;
setInterval("scrollUp()",10);
}
function scrollUp(){
if(stopscroll==true) return;
currentTop+=1;
if(currentTop==22)
{
stoptime+=1;
currentTop-=1;
if(stoptime==15)
{
currentTop=0;
stoptime=0;
}
}
else {
preTop=icefable1.scrollTop;
icefable1.scrollTop+=1;
if(preTop==icefable1.scrollTop){
icefable1.scrollTop=icefable2.offsetHeight-marqueesHeight;
icefable1.scrollTop+=1;
}
}
}
init_srolltext();
</script>
[/html] |
好複雜...請問速度在哪裡調啊? |
if(stoptime==15) |
請問怎樣限制循環的次數 ?
就是循環3次之後就停留在開始處. |
循環數次之後會變形的... -______________-"
這是不是BUG....
我想,限制循環次數就算了...
應該簡單點吧... 哪位知道? |
這個版本的,不好控制! |
|