<SCRIPT type = "text/JavaScript">
FunctionCheck(){
// Verification with a start time greater than the end time
VaR validtime = Document. form1.validtime. value;
VaR invalidtime = Document. form1.invalidtime. value;
VaR begintimes = validtime. substring (0, 10). Split ('-');
VaR endtimes = invalidtime. substring (0, 10). Split ('-');
Validtime = begintimes [1] + '/' + begintimes [2] + '/' + begintimes [0] + '/' + validtime. substring (10, 19 );
Invalidtime = endtimes [1] + '/' + endtimes [2] + '/' + endtimes [0] + '/' + invalidtime. substring (10, 19 );
VaR A = (date. parse (invalidtime)-date. parse (validtime)/3600/1000;
If (A <0 ){
Alert ("the expiration time cannot be earlier than the effective time! ");
Return;
}
VaR emergency = Document. form1.emergency. value;
If (Emergency = "" | regnull. Test (emergency )){
Alert ("Please enter the degree of urgency! ");
Document. form1.emergency. Focus ();
Return;
}
Document. form1.submit ();
}
<SCRIPT>