Home > Web Front-end > JS Tutorial > body text

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

WBOY
Release: 2016-05-16 16:39:09
Original
1067 people have browsed it

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());
}
Copy after login

The body part code of the jsp page:

<td><label>日期:</label></td>
<td><input type="text" id="startTime">至:<input type="text" id="endTime"></td>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template