你好抱歉我的英语不好。
如何将第一行中数据单元格的那一端移动到第二列的第一行。在一个添加函数中,它只添加了 tbody < td > 示例 < td >,所以它只出现在第一行,任何想法看起来都像在这个 Image bottom one is now want to looks like top one 的顶部?。
$(".chkbox").click(function(){
var value = $(this).val(),$list=$("#tablebody");
if(this.click){
$list.append("<td data-value='"+ value + "'>"+ value + "</td>")
$(this).remove();
}
});
最佳答案
$(".chkbox").click(function() {
var value = $(this).val(),
Idans = $(this).attr('id'),
$list = $("#tablebody"),
$lastRow = $list.find("tr").last(),
if ($lastRow.length === 0 || $lastRow.find("td").length >= columnCount) {
$lastRow = $("<tr></tr>").appendTo($list)
}
$lastRow.append("<td data-value='" + value + "'>" + "<b>" + value + " Id = " +Idans + "</b>" + "</td>")
$(this).remove();
})
从这个可能需要 future 猜测的任何人那里得到我的答案
关于jquery - 如何在行中显示数据看起来像列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45164849/