日期:2014-05-20 浏览次数:20664 次
<html>
<head>
<title></title>
<script type="text/javascript">
message = "啊爱德华数据返回氨基酸的恢复进啊十多个进啊会丢失放假哈市对景挂画阿会计师的恢复卷卡式带给卷卡式带付款就啊是的会计法哈市空间低功耗阿会计师的发货"
pos = 0 /*初始截字符的位置*/
maxlength = message.length + 1
function writemsg() {
if (pos < maxlength) {
txt = message.substring(pos, 0)
document.forms[0].vito.value = txt
document.forms[0].vito.style.color = '#00F' /*设置打出来的字体样式*/
timer = setTimeout("writemsg()", 50) /*设置间隔50毫秒打一个字*/
pos++
}
}
</script>
</head>
<body>
<form action="">
<textarea rows="10" cols="160" id="vito"></textarea><br />
<input type="button" onclick="writemsg()" value="开始" />
</form>
</body>
</html>