随笔分类 -  js设计模式的代码

摘要:无标题文档 阅读全文
posted @ 2013-11-21 23:58 方方和圆圆 阅读(345) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2013-11-21 23:57 方方和圆圆 阅读(411) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2013-11-21 23:56 方方和圆圆 阅读(512) 评论(0) 推荐(0)
摘要:无标题文档 阅读全文
posted @ 2013-11-19 23:34 方方和圆圆 阅读(606) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2013-11-19 23:02 方方和圆圆 阅读(447) 评论(0) 推荐(0)
摘要:function getBeerById( id, callback){ _request('GET','URL'+id,function(res){ callback(res.responseText) }); }; function getBeerByIdBridge(){ getBeerById(id,function(res){ alert(res.toString()); }); //doAnothering; }; var el = do... 阅读全文
posted @ 2013-11-18 17:34 方方和圆圆 阅读(269) 评论(0) 推荐(0)
摘要:简单的装饰模式 抄自tom大叔的博客。热门那边就有了,去学习吧 阅读全文
posted @ 2013-11-18 16:44 方方和圆圆 阅读(216) 评论(0) 推荐(0)
摘要:工厂模式,抄自tamu大叔博客的 阅读全文
posted @ 2013-11-18 09:37 方方和圆圆 阅读(424) 评论(0) 推荐(0)
摘要:parten 阅读全文
posted @ 2013-11-17 23:46 方方和圆圆 阅读(557) 评论(0) 推荐(0)
摘要://singletonvar SingletonTester = (function(){ function Singleton(options){ options = options || {}; this.name = "SingletonTester"; this.pointX = options.pointX || 6; this.pointY = options.pointY || 10; }; var instance; var _static = { name : "Single... 阅读全文
posted @ 2013-11-17 23:44 方方和圆圆 阅读(412) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2013-11-17 18:58 方方和圆圆 阅读(726) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2013-11-17 17:41 方方和圆圆 阅读(661) 评论(0) 推荐(0)
摘要:直接上代码了 阅读全文
posted @ 2013-11-17 17:03 方方和圆圆 阅读(506) 评论(0) 推荐(0)

再过一百年, 我会在哪里?