Home  >  Article  >  Web Front-end  >  jquery implements automatically adding the current date to the date plug-in when the page is loaded_jquery

jquery implements automatically adding the current date to the date plug-in when the page is loaded_jquery

WBOY
WBOYOriginal
2016-05-16 16:39:091065browse

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>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn