1秒加1

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="js/jquery.min.js"></script>
</head>
<body>
<div class="helloweb">0%</div>
<script>
$(document).ready(function(e) {
var txt = $(".helloweb");
(function(){
var v = parseInt(txt.html());
if(v < 80){
// txt.html(++ v +'%');
txt.html(++ v +'s');
setTimeout(arguments.callee,1000);//每1000毫秒增长一次
};
})();
});
</script>
</body>
</html>
原文地址:https://www.cnblogs.com/heyiming/p/6086481.html