递归函数中清空静态变量
摘要:/** * 函数中清空静态变量 * $i 第一次为空,会清空静态变量,下次调用时已经++ ,故不会在清空 */function array_multi2single($array, $i = 0) { static $result_array=array(); if(empty($i)) { $result_array = array(); } foreach($array as $key=>$value) { if(is_array($value)) { ...
阅读全文
posted @
2013-05-30 00:39
思齐_
阅读(1295)
推荐(0) 编辑
jsloader
摘要:/*** 用作cookie 代理相关的函数操作,* 需要 Ffunction.js 否则需要将 cookie 部分copy出来*///cookie代理iframfunction FCookieFrame(idPrefix,src,fun){ this._cf = document.createElement("iframe"); this._cf.id = idPrefix+"_cookie_frame"; this._cf.name = idPrefix+"_cookie_frame"; this._cf.style.display
阅读全文
posted @
2013-05-29 01:38
思齐_
阅读(807)
推荐(0) 编辑
由自动执行的匿名函数引起的js错误
摘要:<script>(function(){ alert(1); })()(function(){ alert(1); })()</script>上面的代码会提示这样的错误解决方法:<script>(function(){ alert(1); })();//增加一个分号(function(){ alert(1); })()</script>参考:https://github.com/filamentgroup/quickconcat/issues/11 https://github.com/imakewebthings/jquery-waypoin.
阅读全文
posted @
2013-05-29 01:28
思齐_
阅读(973)
推荐(0) 编辑