[英]Unwanted extra row in my html table
I have this below code: 我有以下代码:
{
str = str + "<thead><tr><th class=tableGridFontHeader>Condition</th>";
str = str + "<th class=tableGridFontHeader>UnAdjusted Value</th></tr></thead>";
str = str + "<tbody></tbody><tr><td class=tableGridFont align=center>B-Average</td>";
str = str + "<td>" + avgUnAdjTxt + "</td></tr>";
str = str + "<tr><td class=tableGridFont align=center>C-Rough</td>";
str = str + "<td>" + accounting.formatMoney(roughUnAdjTxt, "$", 0) + "</td></tr></tbody>";
$("#blackBookWholeSaleTable").html(str);
My css: 我的CSS:
.tableGridFontHeader
{
font-size:16px;
color:#09364b;
background-color:#bdd2dc;
padding-left: 15px;
}
.tableGridFont
{
font-size:14px;
color:#555f60;
padding-left: 15px;
}
}
I am seeing an extra row when I reload this table: 重新加载此表时,我看到了额外的一行:
I can't remove it no matter what I do. 无论做什么,我都无法删除它。 When I look at the source I see an extra tbody. 当我查看源代码时,会看到一个额外的提示。
In the third row, you have closed the tbody. 在第三行中,您已经关闭了tbody。
str = str + "<tbody></tbody><tr><td class=tableGridFont align=center>B-Average</td>";
change this to: 更改为:
str = str + "<tbody><tr><td class=tableGridFont align=center>B-Average</td>";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.