开发者

How to append a tbody after removing tbody using jquery?

开发者 https://www.devze.com 2023-03-27 13:11 出处:网络
if ($(\"#ddlRateCode\").next().val() != \"MYKL GROSS\") { $(\"#compRecord tbody\").remove(); $(\"#compRecord tbody\").append(\"<tr class=\'compensationRecords\'>\" +
if ($("#ddlRateCode").next().val() != "MYKL GROSS") {
                                    $("#compRecord tbody").remove();
                                    $("#compRecord tbody").append("<tr class='compensationRecords'>" +
                        "<td class='tdCompRateCode table_td'>" + $("#ddlRateCode")开发者_开发技巧.next().val() + "</td>" +
                        "<td class='tdCompRate table_td'>" + $("#txtCompRate").val() + "</td>" +
                        "<td class='tdCompPercent table_td'>" + $("#txtCompPercent").val() + "</td>" +
                        "<input type='hidden' value='" + $("#ddlRateCode").val() + "' class='tdRateCodeId' />" +
                        "<td class='table_td'><button class='edit'>Edit</button>" +
                        "<button class='btnDelete'>Delete</button></td>" +
                        "</tr>");
                                }          


$("#compRecord").append("<tbody><tr>...</tr></tbody>");

If that is not what you are looking for, you'll need to describe your problem better. Just the question in the head and some random code without explanation isn't a good question.

0

精彩评论

暂无评论...
验证码 换一张
取 消