<style type="text/css">
.S{font-size:12px}
</style><script language='JavaScript'>
var strArray=new Array();
strArray[0]='   最新来访买家 398,128   最新询价数 280,159   买家询价总数 30,113,621'
strArray[1]='   供应信息总数 1,881,471   新增供求信息 45,175   求购信息总数 652,823'
showId=Math.floor(Math.random()*1);
tempStr=strArray[showId];
strArray[showId]=strArray[0];
strArray[0]=tempStr;document.write('<table width=100% border=0 cellspacing=0 cellpadding=0>'
+'<tr><td width=150 align=right class=s>2004年05月06日</td><td>'
+'<div id="icefable1" style="width:750;">'
+'<table width=600 border=0 cellspacing=0 cellpadding=0>'
+'<tr><td width=600 height=21 class="S">'+strArray[0]+'</td></tr>'
+'<tr><td width=600 height=21 class="S">'+strArray[1]+'</td></tr>'
+'</table>'
+'</div>'
+'<div id="icefable2" style="position:absolute;z-index:1;visibility:hidden"></div>'
+'</td></tr>'
+'</table>');
marqueesHeight=20;
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()",50);
}
function scrollUp(){
if(stopscroll==true) return;
currentTop+=1;
if(currentTop==22)
{
stoptime+=1;
currentTop-=1;
if(stoptime==50) 
{
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>

解决方案 »

  1.   

    这些代码是CGI或其它程序自动生成的我直接找出的代码,希望是你需要的
      

  2.   

    是其它程序自动生成的,那其它程序该怎么写呢(是用ASP吗)?
    事情是这样的,有一个商务网站也想做这样一个东西,把任务交给我了,我总不能把这些代码打上去吧?
      

  3.   

    asp和jsp 都可以这里需要动态改变的只有两句----------------------------------------------------------------------------
    strArray[0]='   最新来访买家 398,128   最新询价数 280,159   买家询价总数 30,113,621'
    strArray[1]='   供应信息总数 1,881,471   新增供求信息 45,175   求购信息总数 652,823'
    ----------------------------------------------------------------------------
    这里面的数字 你改改就行了jsp (简单的示例,这个变量可以来自数据库)
    ----------------------------------------------------------------------------
    strArray[0]='   最新来访买家 <%=t1%>,<%=t2%>   最新询价数 <%=p1%>,<%=p2%>  买家询价总数 <%=t1%>,<%=t2%>,<%=t3%>'
    ----------------------------------------------------------------------------