如何查看我的变量对象

How to see my variables Objects

本文关键字:对象 变量 我的 何查看      更新时间:2023-09-26

我是javascript新手,我想查看Object 中的所有变量

我这样做:

function configModal(data,buttonDatas){
...
alert(data.type);
...
}

但我有这个:

[对象对象]

Thx

只需使用stringigy

alert(JSON.stringify(data.type));

或使用console.log 显示对象

console.log(data.type);

试试这样的东西[Firefox=>ctrl+shift+k]

 console.log(data.type)

参考

https://developer.mozilla.org/en-US/docs/Tools/Web_Console

firefox 的TRY firebug

https://getfirebug.com/wiki/index.php/Console_Panel

谷歌铬

https://developer.chrome.com/devtools/docs/console