| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
灬猜想灬
12年前发布

JavaScript Sleep

function sleep(millisecond)  {   var now = new Date();   var outTime = now.getTime() + millisecond;   while (true)   {    now = new Date();    if (now.getTime() > outTime)    {     return;    }   }  }      function Test()  {   alert("sleep");   sleep(3000);   alert("continue");  }