var a ={'key1':{key12:value12,key13:value13},'key2':{key22:value22}} 如何追加元素
------解决方案--------------------
prototype这个不可以么?
------解决方案--------------------
<SCRIPT LANGUAGE="JavaScript">
<!--
var a ={'key1':{'key12':'value12','key13':'value13'},'key2':{'key22':'value22'}}
a.key3={'key31':'31','key32':'32'};
alert(a.key3.key31);
//-->
</SCRIPT>
------解决方案--------------------
建议看看json字符串
------解决方案--------------------
换个马甲而已,本质还是一个 Object,加个属性即可。