jquery-tabledit不发送标识符
问题描述:
我试图使用:https://github.com/markcell/jquery-tabledit/blob/master/README.md,并设置它的发送数据到表单,不幸的是它当前不包括标识符在表单发布,将感激任何帮助。jquery-tabledit不发送标识符
我使用的网站上的例子: HTML代码:
<table class="table table-striped table-bordered" id="example">
<caption>
Click the table cells to edit.
</caption>
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
$('#example').Tabledit({
url: 'example.php',
editButton: false,
removeButton: false,
columns: {
identifier: [0, 'id'],
editable: [[1, 'First Name'],[2, 'Last Name'],[3, 'Username', '{"1": "@mdo", "2": "@fat", "3": "@twitter"}']]
}
});
在后的唯一数据是已编辑的字段和行动。任何帮助获得标识符到帖子的帮助将非常感激。你可以告诉新的这个,
答
我刚刚有同样的问题,但我想通了。您是使用较旧的示例还是来自其他网站?我通过寻找内联编辑来识别它,但我无法再找到它。
反正你想改变
<th scope="row">2</th>
到<td scope="row">2</td>
看起来你必须保持<th>
在头(其中它理应属于)
感谢很多答案。你节省了我的时间 –