springboot怎么把数据传给前端:springboot 如何引入前端 bootstrap?
这种问题网上一搜一大堆,你可以具体找一篇文章试试,遇到问题可以针对相关问题去提问。springboot通过jar包方式引入bootstrap_个人文章 - SegmentFault 思否 这不是查查就
顺晟科技
2022-10-19 11:56:16
250
我正在动态创建一个表,每一行都有一个按钮。单击按钮后,OI希望提取该行的单元格值。
HTML:
<table class="table table-hover table-bordered" id="alterationsTable">
<thead>
<tr>
<th>Date</th>
<th>Problem/Event</th>
<th>Discuss</th>
<th>Outcome Modification</th>
<th>Add/Update</th>
</tr>
</thead>
<tbody id="alterationsTablebody">
<tr>
<!-- Place for training alterations/notes details -->
</tr>
</tbody>
</table>
要创建的JS:
<table class="table table-hover table-bordered" id="alterationsTable">
<thead>
<tr>
<th>Date</th>
<th>Problem/Event</th>
<th>Discuss</th>
<th>Outcome Modification</th>
<th>Add/Update</th>
</tr>
</thead>
<tbody id="alterationsTablebody">
<tr>
<!-- Place for training alterations/notes details -->
</tr>
</tbody>
</table>
$(html).appendto($(“#AlterationStableBody”));
要提取的JS:
<table class="table table-hover table-bordered" id="alterationsTable">
<thead>
<tr>
<th>Date</th>
<th>Problem/Event</th>
<th>Discuss</th>
<th>Outcome Modification</th>
<th>Add/Update</th>
</tr>
</thead>
<tbody id="alterationsTablebody">
<tr>
<!-- Place for training alterations/notes details -->
</tr>
</tbody>
</table>
顺晟科技:
这是我根据Abhilash的回答提出的:
要创建的JS:
<table class="table table-hover table-bordered" id="alterationsTable">
<thead>
<tr>
<th>Date</th>
<th>Problem/Event</th>
<th>Discuss</th>
<th>Outcome Modification</th>
<th>Add/Update</th>
</tr>
</thead>
<tbody id="alterationsTablebody">
<tr>
<!-- Place for training alterations/notes details -->
</tr>
</tbody>
</table>
要提取的JS:
<table class="table table-hover table-bordered" id="alterationsTable">
<thead>
<tr>
<th>Date</th>
<th>Problem/Event</th>
<th>Discuss</th>
<th>Outcome Modification</th>
<th>Add/Update</th>
</tr>
</thead>
<tbody id="alterationsTablebody">
<tr>
<!-- Place for training alterations/notes details -->
</tr>
</tbody>
</table>
嘿,您试图从td元素访问值,但实际值将存储在td元素内部的input元素中。检查代码段。
05
2022-12
02
2022-12
02
2022-12
29
2022-11
29
2022-11
24
2022-11