<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>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 "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.objuse_id).onInterval(Marquee,sp) <br>eval(this.objoverid).onmomotion( ) {clearInterval(MyMar)} <br>eval(this.obj_id).onmouseout=function() {MyMar=setInterval(Marquee,sp)} </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><br> <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="北京歡迎您"> </div> <input id="Button2" type="button" value="滾動" onclick="show1()">