【JS】使用变量作为object的key-方法汇总 ; a = 'id' · str = '{'+a+' : 12}' 3 var obj = eval("("+str+")"); · obj={id:12} ; a='name' · obj={}; 3 obj[a]=' ...
確定! 回上一頁