var a=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})/
if (!a.test(document.form1.lx_riqi.value))
{
alert("日期格式不正确!")
return false
}
转载于:https://www.cnblogs.com/kentico/archive/2012/08/27/2658705.html
转载于:https://www.cnblogs.com/kentico/archive/2012/08/27/2658705.html