Jquery notes (2) debugging and jquery notes debugging
Before js debugging, I used ie8 to use alert step by step. The error message showed that I felt bad.
Now chrome can be used not only for js debugging, but also for css online viewing. Click F12 to go to debugging.
1. You can view the printed information on the Console tab. You can use console ("Enter **") to print statements in js Code. Unlike alert, alert () is a pop-up box, while console is printed on the console,
2. Enter the dom node on the Console tab, and press $ ("***") to return the selected element. You can bind an event after seeing the selected element. In debug mode, click events do not respond. You can use $ ("***")
Check whether you want to select a node. * *** It can be $ ("# id") $ (". class") or a combination, as long as it is a dom node.
3. On the Sources tab, you can select a js file for breakpoint debugging. The value of the variable is displayed.
4. You can view HTML code on the Elements tab. Styles on the right side of the window can change the style online to see the effect.
Install firebug in Firefox.
Download the firebug-3.0.0-alpha.6.xpi, open the browser drag inside, click the installation is complete. Some may try some versions due to version incompatibility.