摘要: 阅读全文
posted @ 2013-01-23 17:53 leamiko 阅读(142) 评论(0) 推荐(0)
摘要: /*** 手机号码* 移动:134[0-8],135,136,137,138,139,150,151,157,158,159,182,187,188* 联通:130,131,132,152,155,156,185,186* 电信:133,1349,153,180,189*/String MOBILE = "^1(3[0-9]|5[0-35-9]|8[025-9])\\d{8}$";/*** 中国移动:China Mobile* 134[0-8],135,136,137,138,139,150,151,157,158,159,182,187,188*/String CM = 阅读全文
posted @ 2012-12-26 14:31 leamiko 阅读(160) 评论(0) 推荐(0)
摘要: /** * 身份证15位编码规则:dddddd yymmdd xx p * dddddd:地区码 * yymmdd: 出生年月日 * xx: 顺序类编码,无法确定 * p: 性别,奇数为男,偶数为女 * 身份证18位编码规则:dddddd yyyymmdd xxx y * dddddd:地区码 * yyyymmdd: 出生年月日 * xxx:顺序类编码,无法确定,奇数为男,偶数为女 * y: 校验码,该位数值可通过前17位计算获得 * 18位号码加权因子为(从右到左) Wi = [ 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2,1 ] 阅读全文
posted @ 2012-10-31 15:16 leamiko 阅读(351) 评论(0) 推荐(0)
摘要: // ##FE通过call apply 借调其他函数FF// * 当FF为构造函数的时候,FE继承了FF的实例属性以及实例方法// * 当FF为普通函数的时候,FE调用它,但FF的context变成了FE var A = function () { console.log('executing A'); this.name = "I\'am A"; this.sayName = function () { console.log('... 阅读全文
posted @ 2012-10-29 11:50 leamiko 阅读(163) 评论(0) 推荐(0)
摘要: <select class="" id="location"> <option value="-1">please select...</option> <option value="111" label="woshi">hello</option> <option value="1111" label="woshi1">hello2</option> </selec 阅读全文
posted @ 2012-10-25 22:38 leamiko 阅读(315) 评论(0) 推荐(0)
摘要: (function($){ $.fn.autoTextarea = function(options) { var defaults={ maxHeight:null,//文本框是否自动撑高,默认:null,不自动撑高;如果自动撑高必须输入数值,该值作为文本框自动撑高的最大高度 minHeight:$(this).height() //默认最小高度,也就是文本框最初的高度,当内容高度小于... 阅读全文
posted @ 2012-08-21 15:37 leamiko 阅读(182) 评论(0) 推荐(0)
摘要: *伯斯塔尔法则*//*求真务实*//*平稳退化==>渐进增强*//*梅特卡夫定律:网络价值同网络用户数量的平方成正比。*//*最终用户优先一旦遇到冲突,最终用户优先,其次是作者,其次是实现者,其次标准制定者,最后才是理论上的完满。*//*内容模型headernavsectionarticlefooter*/<divclass="usermod"><divclass="hd"></div><divclass="bd"></div><divclass="ft 阅读全文
posted @ 2011-09-23 18:09 leamiko 阅读(195) 评论(0) 推荐(0)
摘要: 转自:http://www.cn-cuckoo.com/2010/10/21/the-design-of-html5-2151.html今天我想跟大家谈一谈HTML5的设计。主要分两个方面:一方面,当然了,就是HTML5。我可以站在这儿只讲HTML5,但我并不打算这样做,因为如果你想了解HTML5的话,你可以Google,可以看书,甚至可以看规范。实际上,确实有人会谈到规范的内容。史蒂夫·福克纳(Steve Faulkner)会讲HTML5与可访问性。而保罗·艾里什(Paul Irish)则会讲HTML5提供的各种API。因此,我今天站在这里,不会光讲一讲HTML5就算完事 阅读全文
posted @ 2011-09-23 17:53 leamiko 阅读(1996) 评论(2) 推荐(1)
摘要: View Code //MIXINS//modulepattern//Idefineafunctionandthenimmediatelyexecuteitwithinit'sownprivatebubble(functioncontext)(function(){//DataRetrievalvarXMLHttpFactories=[function(){returnnewXMLHttpRequest()},function(){returnnewActiveXObject('Msxml2.XMLHTTP')},function(){returnnewActiveXO 阅读全文
posted @ 2011-09-22 00:51 leamiko 阅读(187) 评论(0) 推荐(0)
摘要: var fun1 = function() {return 'hello fun1'} (); var fun2 = (function() {return 'hello fun2'}) (); 如果直接 function() {return 'hello fun1'} (); 报错,函数没有被括起来,产生了歧义认为 {}有可能是json对象,固有语法错误. (function() {return 'hello fun2'}) (); //正确语法,定义且执行一个函数 string to json 参见:http://www.cn 阅读全文
posted @ 2011-09-09 10:06 leamiko 阅读(942) 评论(0) 推荐(0)
document.getElementById('MySignature') && document.getElementById('MySignature').style.display = "none"; document.getElementById('MySignature') && document.getElementById('blog_post_info').style.display = "none";