<html>
<head>
<script>
var num=0
var max=3
function addnum(){
alert('~~~~'+num);//你 所 要做 的 事
if(num<max){
setTimeout(addnum,500)
}else{
}
num++
}
setTimeout(addnum,500)
</script></head>
<body></body>
</html>
<head>
<script>
var num=0
var max=3
function addnum(){
alert('~~~~'+num);//你 所 要做 的 事
if(num<max){
setTimeout(addnum,500)
}else{
}
num++
}
setTimeout(addnum,500)
</script></head>
<body></body>
</html>