var newrow =
$(
"<tr id=" + mahs + ">"
+ "<td id=\"stt\">" + $("#txtIncrement").val() + "</td>"
+ "<td id=\"mahs\">" + mahs + "</td>"
+ "<td id=\"fullname\">" + $("#txtFullname").val() + "</td>"
+ "<td id=\"delete\">" + "<a href=\"#\"><img src=\"/Contents/Images/delete.png\" style=\"width:30px;height:30px;\" alt=\"\" /></a>" + "</td>"
+ "</tr>");
$("#tbContent").append(newrow);
我使用此代码在下面的 div 标签中向 table(tbContent) 添加新行。
<div id="scrollpanel" class="cvleft" style="height:417px; overflow:scroll;">
<table id="tbContent">
<thead>
<tr>
<th>STT</th>
<th>HS</th>
<th>Name</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
添加到 table 时如何聚焦该行?谢谢!