上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 55 下一页
摘要: 观察者模式观察者设计模式能够更便利创建和查看目标对象状态的对象,并且提供和核心对象非耦合的置顶功能性。观察者设计模式非常常用,在一般复杂的WEB系统中,观察者模式可以帮你减轻代码设计的压力,降低代码耦合。场景设计设计一个订单类订单创建完成后,会做各种动作,比如发送EMAIL,或者改变订单状态等等。原始的方法,是将这些操作都写在create函数里面但是随着订单创建类的越来越庞大,这样的操作已经无法满足需求和快速变动这个时候,观察者模式出现了。代码设计:observers[$type][] = $observer; } //运行观察者 public functio... 阅读全文
posted @ 2013-12-28 13:10 一束光 阅读(2019) 评论(0) 推荐(0)
摘要: ZeroClipboard.setDefaults({ moviePath: "//d2glos6gx2bw40.cloudfront.net/C8QpR9/images/flash/ZeroClipboard.swf", trustedDomains: ['*'], allowScriptAccess: "always"});参考:https://github.com/zeroclipboard/zeroclipboard/issues/103 阅读全文
posted @ 2013-12-23 15:59 一束光 阅读(454) 评论(0) 推荐(0)
摘要: 撰于:http://blog.csdn.net/caleng/article/details/5276403 阅读全文
posted @ 2013-12-11 01:17 一束光 阅读(249) 评论(0) 推荐(0)
摘要: 一:Ajax中Get请求与Post请求的区别 http://www.cnblogs.com/oneword/archive/2011/06/06/2073533.html二:ajax分页:360游戏:http://jifen.wan.360.cn/ajax_getproduct.html?token=aecd9a841cf1d08a6cccdfb6c4459da6 分析:请求是方法加上 ajax (ajax_getproduct.html)以区分普通请求,传递所有需要查询的参数。返回结果以一数组array('errno' => 0, 'errmsg' =& 阅读全文
posted @ 2013-12-09 23:01 一束光 阅读(429) 评论(0) 推荐(0)
摘要: 一:substrjs中:stringObject.substr(start,length) 一个中文算一个字符,一个英文也算一个字符php中:string substr ( string $string , int $start [, int $length ] ) 这个函数对英文截取有效,对中文结果很变态,乱码string mb_substr ( string $str , int $start [, int $length [, string $encoding ]] ) 当$encoding为utf-8时,一个中文一个字符,一个英文一个字符当$encoding为gbk时,截取会出现乱码h 阅读全文
posted @ 2013-12-07 11:33 一束光 阅读(897) 评论(0) 推荐(0)
摘要: 一:区别两种普通的写法:jQuery(function(){});全写为jQuery(document).ready(function(){ });(function(){})(jQuery);其实际上是执行()(para)匿名方法,只不过是传递了jQuery对象。jQuery(function(){ });用于存放操作DOM对象的代码,执行其中代码时DOM对象已存在。不可用于存放开发插件的代码,因为jQuery对象没有得到传递,外部通过jQuery.method也调用不了其中的方法(函数)。 (function(){ })(jQuery);用于存放开发插件的代码,执行其中代码时DOM... 阅读全文
posted @ 2013-12-04 23:00 一束光 阅读(267) 评论(0) 推荐(0)
摘要: /** * 保存首页到桌面 */ public function save_shortcut() { $shortcut = "[DEFAULT] BASEURL=http://www.19youxi.com/ [InternetShortcut] URL=http://www.19youxi.com IDList=IconIndex=43 IDList= IconFile=http://www.19youxi.com/... 阅读全文
posted @ 2013-12-04 17:42 一束光 阅读(1609) 评论(0) 推荐(0)
摘要: $('#gameid').change(function() { var gameid = $(this).val(); if (this.value != '') { $.ajax({ url: '/market/task/?act=ajax_get_game_server_list&gameid=' + gameid, type: 'get', dataType: 'json', beforeSend: funct... 阅读全文
posted @ 2013-12-01 12:55 一束光 阅读(853) 评论(0) 推荐(0)
摘要: 一:美化select表单:chosen.jquery.jshttp://harvesthq.github.io/chosen/关于ajax更新列表后需要触发下插件的事件,才会表现出来:(http://stackoverflow.com/questions/12044330/jquery-chosen-plugin-dynamically-populate-list-by-ajax)The Chosen plugin does not automatically update its list of options when the OPTION elements in the DOM chan 阅读全文
posted @ 2013-11-29 20:01 一束光 阅读(307) 评论(0) 推荐(0)
摘要: Eclipse上GIT插件EGIT使用手册 http://blog.csdn.net/pandakong/article/details/7234974Eclipse上GIT插件EGIT使用手册 http://blog.csdn.net/luckarecs/article/details/7427605 阅读全文
posted @ 2013-11-25 14:51 一束光 阅读(216) 评论(0) 推荐(0)
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 55 下一页

友情链接

CFC4N