//table id pendingTable, ongoingTable, completedTable function show(tableId) { let tables = document.getElementById("myMission").getElementsByTagName("table"); tables[tableId].classList.add("show_table"); for (i = 0; i < tables.length; i++) { if (tables[i].id !== tableId) { tables[i].classList.remove("show_table"); } } }