简体   繁体   English

Chrome开发者工具控制台-检查JavaScript对象

[英]Chrome Developer Tools console - inspect JavaScript object

In the old version of Chrome (not sure which version, I know it was quite some time ago), I could type the following into a console using the Chrome Developer Tools, and it would give me all associated properties of the newly created object: 在旧版本的Chrome(不确定是哪个版本,我知道它已经有很长时间了),我可以使用Chrome开发者工具在控制台中输入以下内容,这将为我提供新创建对象的所有相关属性:

document.createElement('a');

Now, when I do the same, I'm given very little back, and I can barely do anything with the returned item in the console, whereas I would just like to inspect it. 现在,当我做同样的事情时,我得到的回报很少,而且我几乎无法对控制台中返回的项目做任何事情,而我只想检查一下。

铬开发工具

How do I view all the properties of this element, etc. as with the old version of Chrome - so I can inspect all properties and their values? 与旧版本的Chrome一样,如何查看此元素的所有属性,以便可以检查所有属性及其值?

Many thanks. 非常感谢。

var a = document.createElement('a');
console.dir(a)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM