我实在是不想删除代码了,可以直播接看http://cvicse.itcast.net/,有实际效果的.
<div class="cviser_list_l"> <p>资质荣誉</p> <div id="list_c1"> <script type='text/javascript'> var strArray=new Array(); var gg=0; strArray[gg]=' <IMG src=/images/list_icon.gif /> ' + ' 改革开放30周年·中国软件行业中间件信赖产品奖'; gg++; strArray[gg]=' <IMG src=/images/list_icon.gif /> ' + ' 中国软件20年最具应用价值软件产品'; gg++; strArray[gg]=' <IMG src=/images/list_icon.gif /> ' + ' 中国十大创新软件产品'; gg++; strArray[gg]=' <IMG src=/images/list_icon.gif /> ' + ' 最具增值潜力软件产品'; gg++; strArray[gg]=' <IMG src=/images/list_icon.gif /> ' + ' SOA驱动整合应用最佳实践奖'; gg++; strArray[gg]=' <IMG src=/images/list_icon.gif /> ' + ' 推动中间件软件杰出贡献奖'; gg++; strArray[gg]=' <IMG src=/images/list_icon.gif /> ' + ' 中国信息安全值得信赖的网页防篡改品牌'; gg++; strArray[gg]=' <IMG src=/images/list_icon.gif /> ' + ' 涉及国家秘密的计算机信息系统集成甲级资质'; gg++; strArray[gg]=' <IMG src=/images/list_icon.gif /> ' + ' 国家武器装备科研生产许可证'; gg++; strArray[gg]=' <IMG src=/images/list_icon.gif /> ' + ' 国际OMG平台会员单位'; gg++; strArray[gg]=' <IMG src=/images/list_icon.gif /> ' + ' 八方开源软件国际联盟(OW2)发起成员'; gg++; strArray[gg]=' <IMG src=/images/list_icon.gif /> ' + ' 中国“四方国件”主要产业化支撑单位'; gg++; showId=Math.floor(Math.random()*strArray.length); tempStr=strArray[showId]; strArray[showId]=strArray[0]; strArray[0]=tempStr; var tempHTML = '<div id="scrollText">' +'<ul>'; for(var i=0;i<strArray.length;i++){ tempHTML = tempHTML +'<li>'+strArray[i]+'</li>'; } tempHTML = tempHTML +'</ul>' +'</div>'; //alert(tempHTML); document.write(tempHTML); marqueesHeight1 = 145 + "px"; stopscroll1 = false; GetObj("scrollText").scrollTop = 0; with(GetObj("scrollText")){ //style.width=0; style.height = marqueesHeight1; style.overflow = "hidden"; //noWrap=true; } GetObj("scrollText").οnmοuseοver=new Function("stopscroll1=true"); GetObj("scrollText").οnmοuseοut=new Function("stopscroll1=false"); preTop = 0; currentTop = 20; stoptime = 0; GetObj("scrollText").innerHTML += GetObj("scrollText").innerHTML; function init_srolltext1(){ GetObj("scrollText").scrollTop = 0; setInterval("scrollUp1()",50); } init_srolltext1(); function scrollUp1(){ if(stopscroll1==true) return; currentTop+=1; if(currentTop==21) { stoptime+=1; currentTop-=1; if(stoptime==10)//停顿时间设置 { currentTop=0; stoptime=0; } } else { preTop=GetObj("scrollText").scrollTop; GetObj("scrollText").scrollTop+=1; if(preTop == GetObj("scrollText").scrollTop){ GetObj("scrollText").scrollTop = 20; GetObj("scrollText").scrollTop += 1; } } } function GetObj(objName){ if(document.getElementById){ return eval('document.getElementById("' + objName + '")'); }else if(document.layers){ return eval("document.layers['" + objName +"']"); }else{ return eval('document.all.' + objName); } } </script> </div> </div>