Javascript debugging is not very good. Once an error occurs, it is also an ugly warning. I remember someone told me that even if something goes wrong, it should be different from others.
Sometimes, the warning is still invisible (set based on the browser), so I decided to make an error Prompt window to facilitate debugging.
In IE, it's easy to get it done. Window. onerror is enough. However, in Firefox, there is a problem, and the error prompt is never displayed. I checked the information and said that there is no window. event under ff. I 've been depressed for a long time and I 've always wanted to manually add one to it. After trying several methods, an error was accidentally reported. Hmm? Can it still be captured? After reading this, it is a page error, but it is not prompted. It is an error in Ajax asynchronous callback. Is this the problem?
I tried it, but the error FF in the callback could not be captured. How can I use a try to call a function? Try again. OK. So far, the problem has been solved for a long time. In this way, if an error occurs, a prompt box will be displayed to beautify the page. Well, you can.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.