Difference

  • console.log prints the element in an HTML-like tree
  • console.dir prints the element in a JSON-like tree

Example

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

最新文章

  1. 【CSS】其他CSS属性和特性
  2. VMware Workstation+Linux+Xshell+Xftp+MySQL+SQLyog 配置
  3. 关于CacheLookup一个有趣的问题
  4. winform——绑定DataGridView
  5. 3.求m+mm+mmm+…+m…m(n个)的和,其中m为1~9之间的整数。 例如,当m=3、n=4时,求3+33+333+3333的和。
  6. 前端页面js与flash交互——js获取flash对象,并传递参数
  7. 初次使用百度地图API
  8. UWSGI安装与使用
  9. 【C++深入浅出】智能指针之auto_ptr学习
  10. 【转】K短路
  11. web前端框架选型
  12. Spring Boot启动过程(二)
  13. MemCache在Windows环境下的搭建及启动
  14. ABAP开发人员未来应该学些什么
  15. 利用ajax获取网页表单数据,并存储到数据库之二(使用SSH)
  16. pip安装selenium报错:Read timed out
  17. JQuery制作基础的无缝轮播与左右点击效果
  18. kubernetes-kubeadm自动生成的证书过期的解决方法
  19. rails5 后台入门(api mode)
  20. annovar积累

热门文章

  1. 【iCore3双核心板】发布 iCore3 硬件手册!
  2. IntelliJ IDEA使用小技巧
  3. php 截取中文字符串 - ord()函数 0xa0...
  4. spring <context:component-scan>使用说明(转)
  5. AngularJS基础知识2
  6. 好用的Markdown编辑器一览
  7. Java语言程序设计(基础篇) 第五章 循环
  8. Python基础、异常处理
  9. TPS04-J. 使用线程池时确保ThreadLocal变量每次都初始化
  10. Webform Application、ViewState