-1
使用jQuery,如何輸出(並追加)表單中提交的值?jQuery - 將表格數據輸出到表格
例如,我輸入一個名稱,它應該是一個新的表格行,其中包含表單中的名稱。
<form>
Name:<input type="text" />
<input type="submit" />
</form>
<table>
<tr>
<th>Name</th>
</tr>
// Here the name should be appended...within a <tr><td></td></tr>
</table>
謝謝!
它的作品,謝謝! –
有沒有一種方法可以點擊該行並且文本(名稱)會再次出現在表單中,因此我可以編輯它? 也許這樣的事? $('td',row).click(function){ $(this).replaceWith(「」+ newName +「」); }); –