2 3 4 5 6 7 8 | function writeObj(obj){ var description = "" ; for ( var i in obj){ var property=obj[i]; description+=i+ " = " +property+ "\n" ; } alert(description); } |
博客地址:
http://www.jb51.net/article/73498.htm