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