私の現在の読み取りは、forループにあるにもかかわらず、実行された最初の行のデータピッカーのみを表示します。私のjqueryは強力ではありませんが、それが私の問題だと思います。
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.maskedinput.js" type="text/javascript"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker()
$( "#format" ).change(function() {
$( "#datepicker" ).datepicker( "option", "dateFormat", $( this ).val() );
});
});
</script>
これは私のコードの html にすぎません。これにクラスを追加する必要があるかもしれませんが、jquery が ID に基づいてコードを実行するかどうかは問題ではありません。
<tr>
<th><input type="checkbox" id="selectall"/> Check All</th>
<th>Rootname </th>
<td>Urls</td>
<th>custs </th>
<th> jvmms </th>
<th>x64 </th>
<th>currentplatform </th>
<th> currentjdk </th>
<th>currenttomcat </th>
<th>Time </th>
<th>Date </th>
</tr>
{% for status in root %}
<tr>
<td align="center"><input type="checkbox" class="case" name="case"></td>
<td>{{ status.rootname }}</td>
<td>{{ status.urls }}</td>
<td>{{ status.custs }}</td>
<td> {{ status.jvmms }}</td>
<td>{{ status.x64 }}</td>
<td>{{ status.currentplatform }}</td>
<td> {{ status.currentjdk }}</td>
<td>{{ status.currenttomcat }}</td>
<td><p> <input type="text" class="pick" id="datepicker" size="25" /></p></td>
<td>
<input type="text" value="12:00" size="3" />
<select name="ampm">
<option value="am">AM</option>
<option value="pm">PM</option>
</select></td>
</tr>
{% endfor %}
</table>