先看一段代码:
1 2 3 4 5 | setTimeout( function (){ alert( "a" ); }, 0); while (1); alert( "b" ); |
希望在马山可以弹出一个警告提示框 “a” 来,但是始终没有来;而且,在 FireFox 中跑还得到了这样的提示,并提示你是否要终止这段脚本的执行,遇事我选择终止以后,“a” 倒是弹出来了,但是 “b” 却弹不出来了:
Warning: Unresponsive Script
A script on this page may be busy, or it may have stopped responding. You can stop the script n
[……]阅读全文