1.校验日期 <script language=javascript function isDate(str) { var r = str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/); if(r==null)return false; var d = new Date(r, r-1, r); return (d.getFullYear()==r&&(d.getMonth()+1)==r&&d.getDate()==r); } alert(isDate("2002-01-31")); alert(isDate("2002-01-41")...