两个日历控件,开始日期、结束日期。 如果开始日期大于系统时间,则结束日期只需要大于开始日期。如果开始日期小于系统时间,则结束日期需要大于系统时间和开始日期。 <tr bgcolor="#FFFFFF"> <td nowrap colspan="1"> <strong>免评有效期:</strong></td> <td colspan="5"> 从 <input type="text" >disabled</c:if>/> <font color="#FF0000"> *</font>至 <input type="text" >disabled</c:if>/> <font color="#FF0000"> *</font> </td> </tr>function getSysdate(){ // 结束时间大于开始时间并且大于系统时间 var operate_stime = document.getElementById("operate_stime").value; var now = new Date(); var month = now.getMonth()+1 > 9?now.getMonth()+1:'0'+(now.getMonth()+1); var day = now.getDate()+1 > 9?now.getDate():'0'+now.getDate(); var str = now.getYear()+"-"+month+"-"+day; return operate_stime>str?operate_stime:str; } 相关文章: 2021-12-03 2021-06-30 2022-12-23 2022-12-23 2021-11-17 2021-07-08 2021-10-21