json動態建立對象並添加屬性,遍歷屬性

var data = {}; // 若是data已經定義就跳過 data.sex="true"; 或者(若是屬性名稱中有空格) data["sex haha"]="true"; ///更復雜的/// var data={}//定義一個json對象 data.result={};//添加屬性 result data.result.feed=[];//添加屬性feeddata. result.fe
相關文章
相關標籤/搜索