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