JS实现sleep使页面等待

mac2022-06-30  86

/** * sleep函数 * @param {any} delay */ function sleep(delay) { var start = (new Date()).getTime(); while ((new Date()).getTime() - start < delay) { continue; } }

  

转载于:https://www.cnblogs.com/JentZhang/p/11435331.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)