}
//檢查日期 2000/01/01 function CheckDate(source,args) { args.IsValid=true; reg=/^\d{4}\/\d{2}\/\d{2}$/; if(!reg.test(args.Value)) { alert('時間格式錯誤!'); args.IsValid=false; } }
//返回某年某月有多少天 month值從0-11 function getDays(month,year) { var daysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31,30, 31, 30, 31); if (month == 1) return (((0 == (year % 4)) && (0 != (year % 100))) ||(0 == (year % 400))) ? 29 : 28; else return daysInMonth[month]; }
</script>