方法:F12键 或 在浏览器空白处右键,点击“检查”选项,或者 Ctrl+Shift+i 键
console.log(“打印信息”); console.error(“打印信息”); console.dir()可以显示一个对象所有的属性和方法。