07 2011 档案
摘要:window.getStyle = (document.body.currentStyle //这样做是为了让函数有“记性”,不用每次使用这函数的时候都判断一次 ? function (obj, attribute){ obj.currentStyle[attribute] } : document.defaultView ? function (obj, attribute){ return document.defaultView.getComputedStyle(obj,false)[attribute]; } : function (){ return null; }//IE下body
阅读全文
摘要:2011年7月15日23:34:18效率PK —— 统计字符串中字符出现次数原文见:javascript 统计哪个字符出现的次数最多–修正版var str = "The officials say tougher legislation is needed because some \telecommunications companies in recent years have begun new services and made \system upgrades that create technical obstacles to surveillance. They wan
阅读全文
摘要:replace的用法:string.replace(sourceText, replaceText) 先看看replace(RegExp, String) ——摘自《Windows 脚本技术.chm》::/html/js56jsmthreplace.htm 下面任意的匹配变量都能用来识别最新的匹配以
阅读全文

浙公网安备 33010602011771号