标签:http java io ar cti html on javascript ad
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<script language="JavaScript">
function do_submit()
{
var count = 0;
var str=document.getElementById("shuru").value;
var num=parseInt(Math.random()*10)
//alert (num)
var timer = setInterval(function(){
document.getElementById("shuchu").value=str.substring(0,count+num);
count++;
if(count >= str.length){
clearInterval(timer);
}
}, 1000);
}
</script>
<p>
<input name="" type="button" onClick="do_submit()" value="提交" /></button>
<input value="" id="shuru"/>
</p>
<p>
<textarea name="textfeld" id="shuchu" cols="" rows="" readonly="readonly" ></textarea>
</p>
</body>
</html>
标签:http java io ar cti html on javascript ad
原文地址:http://www.cnblogs.com/moliwanzi/p/3939846.html