<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>
posted on 2008-03-25 10:22
Crying 阅读(644)
评论(0) 编辑 收藏 所属分类:
JavaScript和CSS