摘要:
JS超强判断电话号码<script type="text/javascript"> String.prototype.Trim = function() { var m = this.match(/^\s*(\S+(\s+\S+)*)\s*$/); return (m == null) ? "" : m[1]; }String.prototype.isMobile = function() { return (/^(?:13\d|15[89])-?\d{5}(\d{3}|\*{3})$/.test(this.Trim())); }String 阅读全文
posted @ 2012-11-12 21:18
小林叔叔
阅读(446)
评论(0)
推荐(0)
摘要:
JS日期比较function CompareDate(inputDate){ var currentDate = new Date(); if(currentDate.getYear() > inputDate.getYear()) return -1; else if(currentDate.getYear() < inputDate.getYear()) return 1; if(currentDate.getMonth() > inputDate.getMonth()) return -1; else if(currentDate.getMonth() < inp 阅读全文
posted @ 2012-11-12 19:44
小林叔叔
阅读(289)
评论(0)
推荐(0)
浙公网安备 33010602011771号