1. Open the console:
Method: F12 key or right-click in a blank space of the browser and click the "Inspect" option, or Ctrl+Shift+i key
2. Click the "Console" option and enter "console" in the console

3. This way you can know what console methods are, the more commonly used ones There are:
1 2 3 | console.log(“打印信息”);
console.error(“打印信息”);
console.dir()可以显示一个对象所有的属性和方法。
|
Copy after login
For example: console.dir(document.body)

The above is the detailed content of What are the js debugging methods?. For more information, please follow other related articles on the PHP Chinese website!