Home  >  Article  >  Web Front-end  >  jquery实现在页面加载的时自动为日期插件添加当前日期_jquery

jquery实现在页面加载的时自动为日期插件添加当前日期_jquery

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

在页面加载的时候自动为日期插件添加当前日期。

<script type="text/javascript">
$(document).ready(function(){
$("#startTime").val(formatDate());
$("#endTime").val(formatDate());
}

jsp页面的body部分代码:

<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