Difference
console.log prints the element in an HTML-like treeconsole.dir prints the element in a JSON-like treeExample

Specifically, console.log gives special treatment to DOM elements, whereas console.dir does not.
This is often useful when trying to see the full representation of the DOM JS object.
SEE ALSO stackoverflow
console.dir() 与 console.log() 区别
原文:http://www.cnblogs.com/hzj680539/p/5095532.html