我有一个表格如下:
<table>
<tr>...<tr>
<tr>...<tr>
<tr class="replace">...<tr>
<tr class="replace">...<tr>
<tr class="replace">...<tr>
<tr>...<tr>
<tr>...<tr>
</table>
Run Code Online (Sandbox Code Playgroud)
使用jQuery和AJAX,我想<tr>用类名"replace"替换所有内容.
只需使用jQuery的方法.html()
$("tr.replace").html('<td>New content comes here</td>');
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2941 次 |
| 最近记录: |