I'm trying to change the type of the displayed input Text in a row from text to password. It changes the type like I want, but the displayed text doesn't change from visible to invisible..
function changeType() {
  var x = document.getElementById("Table").rows[1].cells;
  var value = x[0].value;
  if (x[0].type == "password") {
    x[0].type = "text";
  } else {
    x[0].type = "password";
  }
}<table id="Table" class="table table-bordered table-dark table-striped table-hover">
  <tr>
    <th>website</th>
    <th>username</th>
    <th>
      <input type="checkbox" onclick="changeType()"> password
    </th>
  </tr>
  <td><input type="password" value="1234567" readonly="readonly"></td>
  <td><input type="text" value="9876543" readonly="readonly"></td>
  <td><input type="text" value="simpleTest" readonly="readonly"></td>
</table> 
     
     
    