console.log()可以取代alert()或document.write(),在网页脚本中使用console.log(data)时,会在控制台打印出数据。
console.dir()可以显示一个对象所有的属性和方法。