这是yyyy-mm-dd hh:mm:ss 的
/^(\d{4})\-(\d{2})\-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/ ;
这是 yyyy-mm-ddde 的
/^(\d{4})\-(\d{2})\-(\d{2})$/
function validateCNDate( strValue ) {
var objRegExp = /^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/
if(!objRegExp.test(strValue))
return false;
else{
var arrayDate = strValue.split(RegExp.$1);
var intDay = parseInt(arrayDate[2],10);
var intYear = parseInt(arrayDate[0],10);
var intMonth = parseInt(arrayDate[1],10);
if(intMon...[ 查看全文 ]