因此,我的表中有一个标题行,其中包含输入以及从该信息中添加新行的能力。我无法克隆确切的标题行,因为我不想要选择/输入/按钮......只是文本/val。我该怎么做呢?我的小提琴目前很简单,但设置已经到位(我实际上不想添加“新”,我想要标题行中的值)http://jsfiddle.net/9dwdz30h/
jQuery
$('.addRow').click(function(){
$('.header').after('<tr><td>new</td></tr>')
})
HTML
<table>
<tr class='header'>
<th>
<input type='text' />
</th>
<th>
<select>
<option>One</option>
<option>Two</option>
</select>
</th>
<th>
<a href="#" class="addRow">Add</a>
</th>
</tr>
</table>