留言频道最新留言标题在首页滚动效果
今天在SOHO剪报荐稿网站看到首页的留言滚动效果,很感兴趣,找了段代码:
留言频道最新留言标题在首页滚动效果,自定义标签代码
===============================================================
<!--特别推荐代码开始-->
<table style="WORD-BREAK: break-all" cellSpacing=0 cellPadding=0 width="100%" border=0>
<tr>
<td class=main_title_575><A class=class href="/Article/ShowElite.asp"><B>站长特别推荐</B></A></td>
</tr>
<tr>
<td class=main_tdbg_575 vAlign=top height=199><div id=icefable2>
<script src='/guestbook/newguest.asp?KindId=0&OnlyTitle=1&num=60&Titlelen=16&Order=1&ShowPic=5&ShowKindName=0&ShowContentLen=0&ShowUserName=0&ShowTime=0'></script>
<script>marqueesHeight=194; stopscroll=false; with(icefable2){ style.width=100; style.height=marqueesHeight; style.overflowX="visible"; style.overflowY="hidden"; noWrap=true; onmouseover=new Function("stopscroll=true"); onmouseout=new Function("stopscroll=false"); } preTop=0; currentTop=41; stoptime=0; icefable2.innerHTML+=icefable2.innerHTML;
function init_srolltext(){ icefable2.scrollTop=0; setInterval("scrollUp()",50); }init_srolltext();
function scrollUp(){ if(stopscroll==true) return; currentTop+=1; if(currentTop==150) { stoptime+=1; currentTop-=1; if(stoptime==40) { currentTop=0; stoptime=0; } } else { preTop=icefable2.scrollTop; icefable2.scrollTop+=1; if(preTop==icefable2.scrollTop){ icefable2.scrollTop=50; icefable2.scrollTop+=1; } }
} </script> </div>
<!--间接式向上滚动代码结束--> </td>
<tr>
<td class=main_shadow></td>
</tr>
</table>
<!--特别推荐代码结束--></td>
================================================================================