2013-03-05 136 views
0

这在Chrome/Firefox中工作得很好,但在IE 9中失败。我怎样才能正确地做到这一点?如何创建嵌套的JavaScript对象

var Wrapper = function() 
{ 
    this.loc = {}; 
    this.loc.default = {}; // fails here in IE 
    this.loc.default.lat = 30; 
    this.loc.default.lon = -120; 
}; 

回答