-1
我有两个text_fields
和一个table
三列。通过点击按钮,我想要将这两个text_field
值添加到前两列中的表中。因此,用户可以一次又一次更改text_field
值,并通过单击添加button
将值添加到下一行。如何将文本框中的值添加到JavaScript或jQuery中的表格中?
两个text_fields
如下:
<input class="cross-reference-question-value" type="text" style="border: 1px solid gray; ">
<input class="cross-reference-answer-value" type="text" style="border: 1px solid gray; ">
这里是table
<table class="gridView" id="selected_units">
<thead>
<tr class="gridViewHeader">
<th>Question</th>
<th>Answer</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr class="<%= cycle('gridViewclickableRowDialog', 'gridViewAltclickableRowDialog') %>">
<td></td>
<td></td>
<td><a href="#">Delete</a></td>
</tr>
</tbody>
</table>
的button_link
是
<a href="#" , class="button" >hello</a>
谢谢!
你试过什么? –
我是一个非常新手的JavaScript。我仍然在努力争取。 – Vinay
请删除downvote。我对JavaScript和学习非常陌生。请不要阻止我。谢谢 – Vinay