<s:form theme="simple" method="post" action="changeAtt" onsubmit="return checkDate();">
<tr>
<td colspan="2">
上班考勤时间:<s:select name="startHour" id="startHour" list="hourList"/> 时 <s:select name="startMin" id="startMin" list="minList"/> 分
</td>
</tr>
<tr>
<td colspan="2">
<s:submit value="确定"/> <s:reset onclick="closetable();" value="取消"/>
</td>
</tr>
</s:form>
Validate the form with javascript before s:submit is submitted,
Note: onsubmit="return checkDate();" must have return! ! !
function checkDate(){
if(startDate<endDate){
return true;
}
art.dialog.tips("Work attendance time is later than off work attendance time, please reset!");
return false;
}