我有一个表格如下:
<table>
<tr>...<tr>
<tr>...<tr>
<tr class="replace">...<tr>
<tr class="replace">...<tr>
<tr class="replace">...<tr>
<tr>...<tr>
<tr>...<tr>
</table>
使用jQuery和AJAX,我想替换所有<tr>
的内容类名为“replace”。
最佳答案
只需使用jQuery的方法 .html()
$("tr.replace").html('<td>New content comes here</td>');
关于php - 使用jquery替换特定的tr内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8268104/