-
等待几秒钟后执行
setTimeout(function(){ alert("123"); }, 2*1000);
2.定时循环
function test(){
alert("123");
}
$(function(){
test();
setInterval(function(){
test();
}, 2*1000)
})
等待几秒钟后执行
setTimeout(function(){
alert("123");
}, 2*1000);
2.定时循环
function test(){
alert("123");
}
$(function(){
test();
setInterval(function(){
test();
}, 2*1000)
})