javascript之中介者模式
摘要:
function Player(name){ this.points=0; this.name=name;}Player.prototype.play=function(){ this.points+=1; mediator.played();}var scoreboard={ element:document.getElementById("results"), update:function(score){ var i,msg=''; for(i in score){ if(score.hasOwnPro... 阅读全文
posted @ 2013-04-28 12:05 Ijavascript 阅读(204) 评论(0) 推荐(0) 编辑