81,122
社区成员




<!DOCTYPE html>
<html>
<head>
<script>
window.onload = test;
var sh;
function test() {
sh = window.setInterval(show, 1000);
}
var x = [100, 200, 300], t = 0;
var num = 0;
function show() {
if (t == x.length) {
clearInterval(sh);
return;
}
num += x[t];
t++;
document.getElementById("dd").value = num;
}
</script>
</head>
<body>
<input id="dd" type="text" value=''/>
</body>
</html>