Javascript 如何组合表行?
我正在从事一个asp.net MVC项目 用户可以添加不同的模板到项目页面,其中包括产品,并将显示在项目页面的产品表中,我需要检查他们是否有相同的产品,组合相同的产品行Javascript 如何组合表行?,javascript,jquery,asp.net,asp.net-mvc,Javascript,Jquery,Asp.net,Asp.net Mvc,我正在从事一个asp.net MVC项目 用户可以添加不同的模板到项目页面,其中包括产品,并将显示在项目页面的产品表中,我需要检查他们是否有相同的产品,组合相同的产品行 $.ajax( { type: "POST", url: "url/"+project.Id, success: function (da
$.ajax(
{
type: "POST",
url: "url/"+project.Id,
success: function (data) {
var template = data.result;
_template = template;
$("#TaskTable tbody tr ").each(function (index) {
debugger;
if (index !== 0) {
$row = $(this);
var id = $row.find("td:first").text();
});
$("#ProductTable tbody").append(template.productLineItems);
$('tbody tr').each(function () {
$(this).find("input[name$='SortOrder']").val($(this).index());
//do the saving here
});
你能用html和
数据创建演示代码吗?