读取数组并显示html div

时间:2018-09-21 13:28:55

标签: javascript html

如何在此表中显示数组“员工”?

想法是在侧面用on按钮显示每个名称。

<div id="projectPopUp" class="popup-window" style="display:none">
  <div class="popuptitle" id="details-name"></div>
  <table width="100%" id="detailsgrid">
    <tr>
      <tr class="bb cls-{id} active-{active}">
        <td class="active-{active}" id="{id}-list" width="70%">{employees}</td>
        <td class="cls-{id} active-{active}" width="30%">
          <button class="buttons" step="0.01" 
                  data-clear-btn="false" 
                  style="background: #006b54; color:white !important ;" 
                  id="{id}-inspectSelected">
          </button>
        </td>
      </tr>
  </table>
  <div>
    <button class="smallButton" onClick="closePopup()">Close</button>
  </div>
</div>

js

var employees = ['usera', 'userb', 'userc'];

1 个答案:

答案 0 :(得分:0)