Javascript Observer Pattern
* 자바스크립트 옵저벼 패턴 document.writeln = function( str ) { document.write( str + " " ); } function Caps() { this.obserable = new Array(); this.price = '2000'; } Caps.prototype = { add : function(observer) { this.obserable[this.obserable.length] = observer; }, remove : function(observer) { for(var i=0;i
웹개발/Javascript
2011. 9. 30. 10:55