Possible causes of errors not found during javascript debugging _ javascript skills
Source: Internet
Author: User
This article explains the possible causes of errors that cannot be found during javascript writing. If you meet a friend, refer to when I wrote a simple html page yesterday and added some basic javascript scripts, it took more than one hour to find out where the error was. The following code is provided. Can you find the problem?
Did you find it. It turns out that there is a semicolon entered in the Chinese mode, and the difference between the two semicolons in notepad is not very obvious, especially when the code is longer, it is more difficult to find. If you say that it is not enough to enable the Chinese input method, but if both alert points require you to prompt Chinese rather than English, it is inevitable that you need to switch between Chinese and English input, therefore, potential risks are increased.
Therefore, the next time you cannot find any problems in Javascript, do not forget that it is probably caused by this annoying small problem. Press ctrl + F to complete the text ';' '; 'replacement can solve the problem quickly. Hope to help you in the future.
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.