摘要: Decorators allow you to inject or modify code in functions or classes. Sounds a bit likeAspect-Oriented Programming(AOP) in Java, doesn't it? Except that it's both much simpler and (as a result) much more powerful. For example, suppose you'd like to do something at the entry and exit poi 阅读全文
posted @ 2011-07-09 20:48 淘小杰 阅读(403) 评论(0) 推荐(0) 编辑
摘要: 最近的项目中大量使用了ajax技术,但ajax应用中容易导致浏览器的前进后退按钮失效,不产生前进后退功能,这是个很头疼的问题,它严重的破坏了用户美好的体验,但通过改变location.hash值来解决Ajax过程中导致的浏览器前进后退按键失效的问题Ybole.hash={url:'',setHash:function(a){ if(a.join)a=a.join('/'); $.browser.msie?$.locationHash(a):location.hash=a; },doHash:function(){var h = location.hash.rep 阅读全文
posted @ 2011-07-09 02:18 淘小杰 阅读(2693) 评论(0) 推荐(1) 编辑