Does anyone know how can I make a sleep in javascript before next line been read by the system?
example:
1 var chkResult = Validation();
2 //sleep here for for 10 sec before the next line been read
3
4 document.getElementById('abc').innerHTML = chkResult;
For this example, how can I make the javascript sleep/wait in line 2 for 10 sec before it continues to read line 4? I had tried setTimeout('', 10000); but it's seems not working for me still...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…