2009-11-25 144 views

回答

18

使用括号表示法来代替。

var name = otherObject.name; 
var o = {}; 
o[name] = otherObject;