js轻便贯彻让文本框内容每一个字的展现出来

复制代码 代码如下:

复制代码 代码如下:

<script language="JavaScript">
<!--
function MArray() {
this.length = MArray.arguments.length
for (var i = 0; i < this.length; i++)
this[i+1] = MArray.arguments[i]}
var fArray = new MArray;
fArray[0]="招待大家学习javascript那门语言!";
fArray[1]="款待大家学习html那门语言!"
fArray[2]="招待大家学习asp那门语言!"
fArray[3]="款待我们学习vbscript那门语言!"
var x = 1;
var y = 0;
var msg1 = fArray[y];
function newsSee() {
if (x==msg1.length+1) {
y+=1;
if (y > 3) y=0;
document.form1.news2.value=' ';
msg1 = fArray[y];
x=0;}
document.form1.news2.value=msg1.substring(0,x);
x+=1;
setTimeout("newsSee() ",100);
}
云顶娱乐棋牌游戏 ,// -->
</script>
<body onLoad="newsSee()">
<form name="form1">
<p align=center><input type="text" name="news2"
size=40></p>
</form>
</body>

<script language="JavaScript">
<!--
function MArray() {
this.length = MArray.arguments.length
for (var i = 0; i < this.length; i++)
this[i+1] = MArray.arguments[i]}
var fArray = new MArray;
fArray[0]="欢迎大家学习javascript那门语言!";
fArray[1]="招待大家学习html那门语言!"
fArray[2]="应接大家学习asp那门语言!"
fArray[3]="迎接我们学习vbscript那门语言!"
var x = 1;
var y = 0;
var msg1 = fArray[y];
function newsSee() {
if (x==msg1.length+1) {
y+=1;
if (y > 3) y=0;
document.form1.news2.value=' ';
msg1 = fArray[y];
x=0;}
document.form1.news2.value=msg1.substring(0,x);
x+=1;
setTimeout("newsSee() ",100);
}
// -->
</script>
<body onLoad="newsSee()">
<form name="form1">
<p align=center><input type="text" name="news2"
size=40></p>
</form>
</body>

相关文章

Comment ()
评论是一种美德,说点什么吧,否则我会恨你的。。。