1
function userObject(start_value) {
this.name = start_value;
this.address = start_value;
this.cars = function() {
this.value = start_value;
this.count = start_value;
};
}
显然上述dosent工作但希望的方向取为具有可作为汽车: userObject.cars.value = 100000;
干杯!
this.cars = { 值:START_VALUE, 计数:START_VALUE }; 做到了。谢谢。 – Ernest 2011-05-20 05:19:40