Home >Web Front-end >JS Tutorial >What are the js debugging methods?

What are the js debugging methods?

一个新手
一个新手Original
2017-10-02 09:43:271990browse


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

What are the js debugging methods?

3. This way you can know what console methods are, the more commonly used ones There are:

console.log(“打印信息”); 
console.error(“打印信息”); 
console.dir()可以显示一个对象所有的属性和方法。
For example: console.dir(document.body)

What are the js debugging methods?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn