Found a very good JavaScript debugging method, currently see can print object/array/function/string four types, using the method and PHP Var_dump (), as long as the direct dump (variable name) can be.
Copy Code code as follows:
Dump (value, [ShowTypes])
@ param value (any) value to dump
@ param [ShowTypes] (Boolean) optional to display each key/value ' s type
@ return (Void) returns Nothing
The Dump method is based on one of the tags available in Coldfusion (<cfdump>) providing the ability to display SIM Ple and complex variables in a user friendly way this is perfect for debugging/inspecting data. There is no way to does this with JavaScript and often I had wanted a. This method would do just so allowing for a infinite amount of data nesting complete with color coding for different dat A types, the ability to show/hide the data ' s type (string/number/boolean/object/array/function), expandable and Collapsibl e Tables/keys and Cross browser support.
Click on the buttons bellow into the some examples in action, toggle the Show data Types box to the JavaScript data typing I N Action (not possible in Coldfusion).
Browser Support
Internet Explorer 6, Internet Explorer 7, Firefox 1.5, Opera 8, Safari 1.2 (MAC), Firefox (MAC)-all tested, should also Work in most other browsers
Dump examples
Official web site
Http://www.netgrow.com.au/files/javascript_dump.cfm
Related documents
Http://www.netgrow.com.au/assets/files/dump/dump.zip
In case the above address cannot be downloaded, the cloud-dwelling community downloads the address locally
Http://www.jb51.net/jiaoben/20804.html