首页 > 解决方案 > 如何在每个表格单元格中选择多个输入值进行复制和粘贴?

问题描述

我想知道是否有一种方法可以在每个表格单元格中选择多个输入值,以便像 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>

标签: javascripthtml

解决方案


推荐阅读