function insertNewRecord(data) {
  let table = document
    .getElementById("empList")
    .getElementsByTagName("tbody")[0];
  let newRow = table.insertRow(table.length);
  cell1 = newRow.insertCell(0);
  cell1.innerHTML = data.name;
  cell2 = newRow.insertCell(1);
  cell2.innerHTML = data.email;
  cell2 = newRow.insertCell(2);
  cell2.innerHTML = data.mobile;
  cell3 = newRow.insertCell(3);
  cell3.innerHTML = data.salary;
  cell4 = newRow.insertCell(4);
  cell4.innerHTML = `<a onclick="onEdit(this)">Edit</a>`;
  cell5 = newRow.insertCell(5);
  cell5.innerHTML = `<a onclick="onDelete(this)">Delete</a>`;
}
// Inserting & Showing Record in Another Table-----------------------------------------------
Inserting & Showing Record in Another Table
Inserting & Showing Record in Another Table
function insertNewRecord(data) {
  let table = document
    .getElementById("empList")
    .getElementsByTagName("tbody")[0];
  let newRow = table.insertRow(table.length);
  cell1 = newRow.insertCell(0);
  cell1.innerHTML = data.name;
  cell2 = newRow.insertCell(1);
  cell2.innerHTML = data.email;
  cell2 = newRow.insertCell(2);
  cell2.innerHTML = data.mobile;
  cell3 = newRow.insertCell(3);
  cell3.innerHTML = data.salary;
  cell4 = newRow.insertCell(4);
  cell4.innerHTML = `<a onclick="onEdit(this)">Edit</a>`;
  cell5 = newRow.insertCell(5);
  cell5.innerHTML = `<a onclick="onDelete(this)">Delete</a>`;
}
function insertNewRecord ( data ) { let table = document . getElementById ( "empList" ) . getElementsByTagName ( "tbody" ) [ 0 ] ; let newRow = table . insertRow ( table . length ) ; cell1 = newRow . insertCell ( 0 ) ; cell1 . innerHTML = data . name ; cell2 = newRow . insertCell ( 1 ) ; cell2 . innerHTML = data . email ; cell2 = newRow . insertCell ( 2 ) ; cell2 . innerHTML = data . mobile ; cell3 = newRow . insertCell ( 3 ) ; cell3 . innerHTML = data . salary ; cell4 = newRow . insertCell ( 4 ) ; cell4 . innerHTML = ` ` ; cell5 = newRow . insertCell ( 5 ) ; cell5 . innerHTML = ` ` ; }
Inserting & Showing Record in Another Table
Inserting & Showing Record in Another Table