12 2013 档案
摘要://这种情况无法sleep,先输出xix,再输出FUCK3次sec = 3;int_id = setInterval(function(){ sec--; alert("FUCK"); if(sec <= 0) clearInterval(int_id);},1000);alert("xix"); //300毫秒后执行function中逻辑(不阻塞),先输出xixsetTimeout(function(){ console.log("execute");},300)alert("xix");
阅读全文

浙公网安备 33010602011771号