/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function sleep(delay) { var start = new Date().getTime(); while (new Date().getTime() < start + delay); } //usage //wait for 3 seconds sleep(3000);