document.querySelector('.editButt').addEventListener('click', function(e) {
let tblData = e.target.previousElementSibling;
document.querySelector('#input_box').value = tblData.innerText;
}
//A Click on edit button will autofill an input box with the associate table data
document.querySelector('.editButt').addEventListener('click', function(e) {
let tblData = e.target.previousElementSibling;
document.querySelector('#input_box').value = tblData.innerText;
}
Download VSCode