function user() { var self = this; this.obj1 = {}; this.obj1.name = "??"; this.obj1.func = function() { return this; }; this.obj1.obj2 = {}; this.obj1.obj2.get = function(a) { alert(self.obj1.name) }; } var f = new user; f.obj1.obj2.get();