JS五種設計模式

對象基礎建立模式 var hero=new Object(); hero.name="無雙劍姬"; hero.passive="無雙劍舞"; hero.skill=function(){ return this.name+"的被動技能是"+this.passive; } document.write(hero.name+"<br/>");
相關文章
相關標籤/搜索