日期:2014-05-17 浏览次数:20472 次
<html>
<head>
<title></title>
<script type="text/javascript">
window.onload = function () {
var d = document.getElementById("c");
var max = 26826;
var step = parseInt(max / (2 * 100));
//console.log(step);
var current = 0;
var timer = window.setInterval(function () {
if (current+step > max) {
d.innerHTML = max.toString();
window.clearInterval(timer);
return;
}
current = current + step;
d.innerHTML = current.toString();
}, 10);
}
</script>
</head>
<body>
<div id = "c"></div>
</body>
</html>