0
與工廠方法的性質我有一類我試圖與工廠設計模式覆蓋,但沒能做到這一點.. 如何調用它究竟改變對象的屬性如何改變在JavaScript
function othername() {
var newobj = new Object();
newobj.fname = "sachin",
newobj.lname = "rawal",
newobj.fullname = function() {
alert(this.fname);
}
return newobj
}
var othername1 = othername ("hi","hello");