Home > Article > Web Front-end > jquery implements automatically adding the current date to the date plug-in when the page is loaded_jquery
Automatically add the current date 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 code of the jsp page:
<td><label>日期:</label></td> <td><input type="text" id="startTime">至:<input type="text" id="endTime"></td>