javascript - 如何在每个表格单元格中选择多个输入值进行复制和粘贴?
问题描述
我想知道是否有一种方法可以在每个表格单元格中选择多个输入值,以便像 Excel 电子表格一样进行复制和粘贴。谢谢
<div class="tab-pane fade show active" id="Collar">
<table class="fixed_headers" id="collarTable">
<thead>
<tr>
<th>Name</th>
<th>X</th>
<th>Y</th>
<th>Z</th>
<th>Dip</th>
<th>Azimuth</th>
<th>Total Length</th>
<th>Date</th>
<th>Comments</th>
<th><i title="Certificate" class="fas fa-award"></i></th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="text" class="form-control input-sm" value="@Model.Collar.sName" disabled/></td>
<td><input type="text" class="form-control input-sm verifyValue" value="@Model.Collar.sX" onchange="ChangeCollar()" alt="X" required /></td>
<td><input type="text" class="form-control input-sm verifyValue" value="@Model.Collar.sY" onchange="ChangeCollar()" alt="Y" required /></td>
<td><input type="text" class="form-control input-sm verifyValue" value="@Model.Collar.sZ" onchange="ChangeCollar()" alt="Z" required /></td>
<td><input type="text" class="form-control input-sm verifyValue" value="@Model.Collar.sDip" onchange="ChangeCollar()" alt="Dip" required /></td>
<td><input type="text" class="form-control input-sm verifyValue" value="@Model.Collar.sDirection" onchange="ChangeCollar()" alt="Direction" required /></td>
<td><input type="text" class="form-control input-sm verifyValue" value="@Model.Collar.sTotalDepth" onchange="ChangeCollar()" alt="Total Depth" required /></td>
<td><input type="text" class="form-control input-sm datepicker" value="@Model.Collar.sDate" onchange="ChangeCollar()" alt="Date" /></td>
<td><input type="text" class="form-control input-sm" value="@Model.Collar.comments" onchange="ChangeCollar()" alt="Comment" /></td>
<td>
<button title="Preview certificate" type="button" data-toggle="modal" data-target="#@ViewCertificateID"><i class="fas fa-eye"></i></button>
</td>
</tr>
</tbody>
</table>
</div>
解决方案
推荐阅读
- c# - UWP ListView 滚动和缩放不起作用
- c - 如何在给定变量作为引用的函数内初始化结构
- python - 在图上使用 Beam Search 生成得分最高的句子
- xslt - 嵌套 XML XSLT 1.0 转换
- c - 我正在尝试编写一个程序,它似乎完全没问题,但我找不到它不起作用的原因,任何帮助将不胜感激
- mysql - 如何在 MySQL 转储文件的一行中提取多个括号之间的文本
- python - 等待协程并将结果分配给协程外部的变量
- ruby-on-rails - 努力让 rails 6 API only 应用程序以我想要的方式运行
- python - 使用列的值(字符串数据类型)过滤熊猫组
- jquery - 如何使用 jquery 仅从该 HTML 表的可见行中检索值?