【发布时间】:2013-12-11 20:56:55
【问题描述】:
我正在尝试将 jquery 的 datepicker 用于我在硬编码时工作的多个表单字段。我不知道如何为可变数量的字段执行此操作。例如,下面我将它硬编码为适用于两个输入。我想对用户在前一页提供的任何数量的输入执行此操作。谢谢您的帮助!
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="https://www.cvrc.virginia.edu/otherscripts/jquery-1.9.1.js"></script>
<script src="https://www.cvrc.virginia.edu/otherscripts/jquery-ui.js"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
$(function() {
$( "#datepicker2" ).datepicker();
});
</script>
<input type=text name=date size=10 id=datepicker>
<input type=text name=date size=10 id=datepicker2>
【问题讨论】:
标签: javascript jquery html forms datepicker