//以下两种方式都行:
setTimeout(function () { test(); }, 2000);
//或者
setTimeout('test()',2000);
function test(){
alert("aaaa");
}
//以下是错误示例
setTimeout(test(),2000);
//会马上执行,没有延迟效果
![]() |
任性的蚂蚁 · 浅谈.Net ...· 10 月前 · |
![]() |
谦和的沙滩裤 · windows - Powershell ...· 1 年前 · |
![]() |
谦和的灌汤包 · Azure Active ...· 1 年前 · |
![]() |
烦恼的手电筒 · Angular tsconfig.json ...· 1 年前 · |