In the Web development process, we often make a few small mistakes, but waste a lot of time, here summed up a few mistakes, to show vigilance.
1. When debugging JS, clearly set a breakpoint, but is not to take a break point. At the beginning of the issue, I constantly modify the JS code, modify the HTML page, and constantly refresh the browser, the problem of caching. Results later found that is because there are more than the introduction of JS, when I set a breakpoint, and the program is to go the other JS, this problem if found, it is not a problem, but if not found, it will waste you a long time.
2. Submitting the form, some field values are not passed to the background. Clearly wrote the name attribute Ah, obviously other field are mentioned backstage Ah, field name is also right Ah, there is no spelling mistakes ah. It was later discovered that the field was not wrapped in a form, only the filed in form forms, with the name attribute, will be submitted to the background, how simple the error is, but when you make a mistake, you are very difficult to find, because we do not believe that we will make such easy mistakes.
3. At the time of development, after modifying the code, refreshing the browser did not achieve the desired results, we always think that is the reason for caching, just over and over again the refresh, and finally found that we have modified the local files, and did not upload to the server, or, we have two local copies, We have modified one of these copies, but we want another copy to display the correct result.
4. How to modify the program, the return of the results are the same one, seemingly we set the conditions are not working, later found that we in order to debug, returned a number of specific values, and then did not modify back, resulting in the following program, running always failed.
5. Why ie, the page always shows abnormal, will automatically jump to the IE7 of the strange mode, it is likely to be doctype affirmation or write a problem.
6. Why the choice of the elements of the event execution has a problem, is not jquery bugs, and then doubt the official before, we have the highest suspicion of their own, do not line up some other results, said that the discovery of bugs, many times is often our understanding is wrong, or the wrong operation, The selected element has a problem with the execution of the event, careful troubleshooting, the original page has more than one ID the same element, and the ID is unique, so the error occurred.