<table border='1px'>
<thead>
<th>field</th>
<th>Size</th>
<th>Type</th>
<th>null</th>
</thead>
<tbody> </tbody>
</table>
<script th:inline="javascript">
/*<![CDATA[*/
$(document).ready(function () {
for (var i = 0; i < 10; i++) {
var row=[],r=0;
row[r]="<tr>";
row[++r]='<td>';
row[++r]='<input id="field" type="text" name="field"';
row[++r]=i;
row[++r]='maxlength="255" required="required"/>';
row[++r]='</td><td>';
row[++r]='<input id="Size" type="text" name="Size"';
row[++r]=i;
row[++r]= 'maxlength="255" required="required"/>';
row[++r]= '</td>';
/*
* this more readable
* other td
*
*/
row[++r]='</tr>';
$("tbody").append(row.join(""));
}
});
/*]]>*/
</script>
задан Brad Koch 21 June 2016 в 19:05
поделиться