How to inspect Javascript Objects

后端 未结 8 533
半阙折子戏
半阙折子戏 2020-12-07 10:31

How can I inspect an Object in an alert box? Normally alerting an Object just throws the nodename:

alert(document);

But I want to get the p

8条回答
  •  失恋的感觉
    2020-12-07 10:54

    Here is my object inspector that is more readable. Because the code takes to long to write down here you can download it at http://etto-aa-js.googlecode.com/svn/trunk/inspector.js

    Use like this :

    document.write(inspect(object));
    

提交回复
热议问题