我在可引脚的jquery库的帮助下实现了一个响应表。现在我已经放置了输入标签,选中了它。Footable js移除所有这些标记,并使其成为空<td>。
<table id="accordion-example-1" class="table" data-paging="true" data-filtering="false" data-sorting="false">
<thead>
<tr>
<th></th>
<th data-breakpoints="xs">Date Created</th>
<th>Source</th>
<th>Type</th>
<th data-breakpoints="xs">Status</th>
<th data-breakpoints="xs sm"> </th>
<th data-breakpoints="xs sm md" > </th>
<th data-breakpoints="xs sm md"> </th>
</tr>
</thead>
<tbody>
<tr data-expanded="true">
<td></td>
<td>6/11/16</td>
<td>Mr. Cooper - Request Info</td>
<td>Buying</td>
<td>
<select class="nobrdr">
<option>Offer</option>
</select>
</td>
<td><input type="text" class="nobrdr" placeholder="Value"/></td>
<td><input type="text" class="nobrdr" placeholder="Date" /></td>
<td><button class="nobrdr m-l-1" type="button" ><b>+ Add</b></button><br>Forms/Docs</td>
</tr>
</tbody>
</table>jquery函数:
$(function($){
$('#accordion-example-1,#accordion-example-2').footable({
});
});发布于 2016-10-31 15:07:17
您需要将表单元素所在的列的数据类型更改为" HTML ",否则FooTable假设该列只包含文本并将其格式化--也就是说,它将从单元格内容中删除所有的HTML标记,而不仅仅是表单元素。
例如,在您的案例中:
<th data-type="html" data-breakpoints="xs">Status</th>将告诉它尊重状态列中任何单元格中的HTML标记。
可能支持的列类型是"text“、"number”、"html“和"date”。如果没有指定类型,则默认为"text“。
关于更详细的讨论,我建议您阅读http://fooplugins.github.io/FooTable/docs/getting-started.html的指南,并找到“列选项”部分。
https://stackoverflow.com/questions/40344712
复制相似问题