<div class="codetitle"> <span><a style="CURSOR: pointer" data="20278" class="copybut" id="copybut20278" onclick="doCopy('code20278')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code20278"> <br><script language="JavaScript"> <BR><!-- <BR>function MArray() { <BR>this.length = MArray.arguments.length <BR>for (var i = 0; i < this.length; i++) <BR>this[i+1] = MArray.arguments[i]} <BR>var fArray = new MArray; <BR>fArray[0]="欢迎大家学习javascript这门语言!"; <BR>fArray[1]="欢迎大家学习html这门语言!" <BR>fArray[2]="欢迎大家学习asp这门语言!" <BR>fArray[3]="欢迎大家学习vbscript这门语言!" <BR>var x = 1; <BR>var y = 0; <BR>var msg1 = fArray[y]; <BR>function newsSee() { <BR>if (x==msg1.length+1) { <BR>y+=1; <BR>if (y > 3) y=0; <BR>document.form1.news2.value=' '; <BR>msg1 = fArray[y]; <BR>x=0;} <BR>document.form1.news2.value=msg1.substring(0,x); <BR>x+=1; <BR>setTimeout("newsSee() ",100); <BR>} <BR>// --> <BR></script> <br> <br><form name="form1"> <br><p align="center"><input type="text" name="news2" size="40"></p> <br> </form> <br> <br> </div>