Node.js is Cancer
摘要:Node.js is Cancer先转一下原文(原文地址似乎已不存在了http://teddziuba.com/2011/10/node-js-is-cancer.html):by Ted Dziuba on Saturday, October 01, 2011If there's one thing web developers love, it's knowing better than conventional wisdom, but conventional wisdom is conventional for a reason: that sh*t works. So
阅读全文
四种浏览器对 clientHeight、offsetHeight、scrollHeight、clientWidth、offsetWidth 和 scrollWidth 的解释差异
摘要:四种浏览器对 clientHeight、offsetHeight、scrollHeight、clientWidth、offsetWidth 和 scrollWidth 的解释差异网页可见区域宽:document.body.clientWidth网页可见区域高:document.body.clientHeight网页可见区域宽:document.body.offsetWidth (包括边线的宽)网页可见区域高:document.body.offsetHeight (包括边线的宽)网页正文全文宽:document.body.scrollWidth网页正文全文高:document.body.scro
阅读全文
Javascript正则表达式验证
摘要:验证数字的正则表达式集 验证数字:^[0-9]*$验证n位的数字:^/d{n}$验证至少n位数字:^/d{n,}$验证m-n位的数字:^/d{m,n}$验证零和非零开头的数字:^(0|[1-9][0-9]*)$验证有两位小数的正实数:^[0-9]+(.[0-9]{2})?$验证有1-3位小数的正实数:^[0-9]+(.[0-9]{1,3})?$验证非零的正整数:^/+?[1-9][0-9]*$验证非零的负整数:^/-[1-9][0-9]*$验证非负整数(正整数 + 0) ^/d+$验证非正整数(负整数 + 0) ^((-/d+)|(0+))$验证长度为3的字符:^.{3}$验证由26个英文字母
阅读全文