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>
posted @ 2016-11-21 18:31  贺小鸣  阅读(139)  评论(0编辑  收藏  举报
为尊重他人劳动成果,转载/摘抄请标明来源!