Jquery implementations automatically add the current date to the date plug in when the page loads
- 2020-03-30 03:44:59
- OfStack
The current date is automatically added to the date plug-in when the page loads.
<script type="text/javascript">
$(document).ready(function(){
$("#startTime").val(formatDate());
$("#endTime").val(formatDate());
}
The body part of the JSP page:
<td><label> Date: </label></td>
<td><input type="text" id="startTime"> Go to: <input type="text" id="endTime"></td>