<div class="codetitle"> <span><a style="CURSOR: pointer" data="94814" class="copybut" id="copybut94814" onclick="doCopy('code94814')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code94814"> <br>function cls_marquee(id,id1,id2,sp){ <br>this.obj_id=id; <br>this.obj_id1=id1; <br>this.obj_id2=id2; <br>this.speed=sp; <br>eval(this.obj_id2+".innerHTML="+this.obj_id1+".innerHTML"); <br>function Marquee(){ <br>if(eval(id2).offsetTop-eval(id).scrollTopeval(id).scrollTop-=eval(id1).offsetHeight <br>else{ <br>eval(id).scrollTop++ <br>} <br>} <br>var MyMar=setInterval(Marquee,sp) <br>eval(this.obj_id).onmouseover=function() {clearInterval(MyMar)} <br>eval(this.obj_id).onmouseout=function() {MyMar=setInterval(Marquee,sp)} <br>} <br> </div> <br>自己刚写的一个小程序,写得满一般的。。。。不过这个接口还成 <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="86528" class="copybut" id="copybut86528" onclick="doCopy('code86528')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code86528"> <br><script type="text/javascript"> <BR>function show() { <BR>var info = document.getElementById('Text1'); <BR>info.value = info.value.substr(1) + info.value[0]; <BR>} <BR>setInterval(show, 500); <BR>function show1() { <BR>var info1 = document.getElementById('Text2'); <BR>info1.value = info1.value[info1.value.length-1] + info1.value.substr(0, info1.value.length-1); <BR>} <BR>setInterval(show1, 500); <BR></script> <br><input id="Text1" type="text" value="欢迎来测试"> <br><input id="Button1" type="button" value="滚动"><br> <br><input id="Text2" type="text" value="北京欢迎您"> <br><input id="Button2" type="button" value="滚动" onclick="show1()"> <br> </div>