[Javascript] String representation of an object ???

prog pan prog.pan at gmail.com
Fri Jul 29 17:02:17 CDT 2005


How can I get a string representation of an object ?

For example:


-- For an element's style, it would be something like:

"{'color':'red', 'fontSize':16}"


-- For an array ['aaa', 2], get:

"['aaa', 2]" 

(this is relative easier, except that getting the quotation mark
around aaa right could be a nightmare.)



More information about the Javascript mailing list