我知道以下内容可用于获取 chrome 开发工具控制台中窗口对象内的对象列表:
for (var prop in window)
console.log(prop);
如果我想查看这些窗口对象的这些属性所保存的值,我该如何查看它们?
有没有快速的方法可以在 Chrome 开发工具中查看这些内容,或者你们通常使用的任何其他方法?
最佳答案
Is there quick way to look at these within the chrome dev tools or any other ways that you guys use in general?
不要使用“console.log”,chrome 有有用的工具来调试您的网络应用程序。
查看 chrome 的调试器:https://developer.chrome.com/devtools/docs/javascript-debugging
教程:http://www.sagarganatra.com/2011/05/javascript-debugging-with-chrome.html
示例:
关于javascript - 如何在chrome中查看window对象内的所有对象属性详细信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28662866/