Ajax debugging is sometimes a headache, because it involves different pages andCodeIn addition, IE7 was not connected to an error viewer before, and JS encountered a problem, except for an error in the status bar in the lower left corner.
When the exclamation point is exceeded, no P prompts are given ~
Therefore, I usually use Firefox to debug Js. Its built-in error console provides great help for error analysis. Alternatively, you can install another firebug plug-in to improve the functionality. Another
In addition, Google Chrome, a browser launched in the previous section, comes with the Javascript console and has powerful features similar to firebug.
If you have these problems, you still have to find a way to analyze them by yourself. Errors Caused by many Ajax problems come from the server.ProgramThe generated XML and the program itself.
In addition to the basic JS debugging methods, I often use the following methods:
1. Directly browse the program page that generates XML.
XML is often found to be faulty, either in the content or in the format. For example, the content in the tag is incorrect or has no content, or the corresponding XML is not generated due to a program error.
2. Let the program generate a string without generating XML, and directly browse the program page.
Let the program directly generate a string without generating XML, such as removing the header ("Content-Type: Application/XML "). In this way, if the program has obvious errors such as syntax, it can be seen directly.