console.log()会在浏览器控制台打印出信息
console.log
prints the element in an HTML-like tree
console.dir()可以显示一个对象的所有属性和方法
console.dir
prints the element in a JSON-like tree
console.log()会在浏览器控制台打印出信息
console.log
prints the element in an HTML-like treeconsole.dir()可以显示一个对象的所有属性和方法
console.dir
prints the element in a JSON-like tree转载于:https://www.cnblogs.com/aoxiangsky/p/10475099.html