简体   繁体   English

一个函数出错后Java脚本函数不起作用

[英]Java Script Functions Doesn't work After Error in One Function

I'm working with Asp.net Mvc and I Use Java script after i get error in A Function In Java Script other functions of page doesn't work until i refresh the page . 我正在使用Asp.net Mvc并在出现函数错误时使用Java脚本。在Java脚本中,页面的其他功能要到刷新页面后才能起作用。 so how can i handle errors for this problem? 那么我该如何处理该问题的错误呢?

The thing with JavaScript is that if the engine finds an error in your page, usually doesn't execute the code beyond that error. JavaScript的问题在于,如果引擎在您的页面中发现错误,通常不会执行超出该错误的代码。

The only thing you could do to handle this is to remove the errors. 您唯一可以做的就是删除错误。

EDIT: 编辑:

Here you can see the most universal way of handling errors. 在这里,您可以看到最通用的错误处理方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM