0
假设有两个文本框,一个输入日期,另一个输入时间。下面是一个例子:在javascript中比较时间和日期
<p><strong>Date:</strong> <input type="text" id="datetxt"></p>
Example of how date is displayed: 25-05-1995
<p><strong>Time:</strong> <input type="text" id="timetxt"></p>
Example of how time is displayed: 14:25
有人建议可以在JavaScript的方式来比较文本框为当前日期和时间日期和时间的值,因此,如果当前日期和时间是过去输入的日期和时间在文本框中,那么它应该显示并提醒?
这两个答案很棒。谢谢。我已经为这件事情做过了,因为它适用于所有日期和时间。再次感谢你 – BruceyBandit