假設我有幾個JavaScript對象我怎樣才能JavaScript對象添加到另一個對象動態
{"type":"gotopage","target":"undefined"}
{"type":"press","target":"a"}
{"type":"rotate","target":"long"}
我如何添加這個對象像
config={}
我知道如何在每另一個對象插入的對象有一個ID我可以添加爲:
config["id"]={}
但在這種情況下,我該如何添加沒有ID的對象?
,但我卻不知道有多少OBJ我有,我不能預先定義它們 – hh54188 2012-04-12 06:11:40