2008年12月31日

JavaScript验证时间格式

摘要: 1. 短时间,形如 (13:04:06) function isTime(str) { var a = str.match(/^(\d{1,2})(:)?(\d{1,2})\2(\d{1,2})$/); if (a == null) {alert('输入的参数不是时间格式'); return false;} if (a[1]>24 || a[3]>60 || a[4]>60) { aler... 阅读全文

posted @ 2008-12-31 16:41 chuncn 阅读(8509) 评论(0) 推荐(0) 编辑

导航