我正在尝试创建淘汰赛模板,该模板应该为淘汰赛阵列中的每一行生成表格行。 当我添加下面的代码它告诉我“元素的脚本不能嵌套元素表内”为表行创建淘汰赛模板
<table>
<tr>
<th>ID#</th>
<th>Name</th>
</tr>
<tr data-bind="template: { name: 'EmployeeTemplate', foreach: EmployeesArray }"></tr>
<script type="text/html" id="EmployeeTemplate">
<td>234567899874</td>
<td>Mr. Test </td>
</script>
我怎样才能解决这个用淘汰赛的模板?我将它关闭this链接。
您是否尝试过移动表格的模板_outside_? –
但我不需要它在表中,如果我想它为tr元素 – shw