当前位置:首页 » JavaScript » js函数sleep
js函数sleep
来自:新思软件时间:2010-06-27 20:18:46
function sleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; }}

使用:sleep(1000);
关键词:js,sleep