我了解运行时错误的原因,现在我想了解浏览器在错误后如何表现。
如果在错误发生前已经绑定了事件处理程序,它们还能继续工作吗?
如果异步加载的脚本在运行时错误后完成加载,它能执行吗?
总的来说,运行时错误有多严重?
我了解运行时错误的原因,现在我想了解浏览器在错误后如何表现。
如果在错误发生前已经绑定了事件处理程序,它们还能继续工作吗?
如果异步加载的脚本在运行时错误后完成加载,它能执行吗?
总的来说,运行时错误有多严重?
<script>
var x=10, y=0;
/*...............
.................
perform some other tasks here
This will execute with no error
.................
................*/
var z=x/y; //here error occur
//below any statements will never execute.
{
/*................
..................
some operations
this block will not execute because a runtime error occurs above.
..................
................*/
}
</script>
在语句var z=x/y;
之后不会执行任何其他语句,因为发生了运行时错误。