摘要:
// numberMillis 毫秒 function sleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime... 阅读全文
摘要:
function test(s){ alert(s);}window.setTimeout(function(){test('str');},1000);这样就可以了...为什么是这样呢.因为setTimeout要求的第一个参数是函数...比如setTimeout(a_fun,1000)这样是可以的 阅读全文