
<script type="text/javascript">
function strToDate(source) {
var tar = source.replace('-','/');
return new Date(tar);
}
function checkCalDate()
{
var frm = document.forms["form1"];
var f = strToDate(frm.establishDate.value);
var t = strToDate(frm.productDate.value);
var e = strToDate(frm.authChDate.value);
if (frm.establishDate.value != "" && frm.productDate.value != ""&&frm.authChDate.value != "") {
if (f.getTime() > t.getTime()) {
alert("建廠日期不能大于投產日期!");
return false;
}
if (t.getTime() >e.getTime()) {
alert("投產日期不能大于審核日期!");
return false;
}
}
return true
}
</script>