Εισαγωγή Δεδομένων





Αποτελέσματα

Ημερομηνία Ποσό
document.getElementById('dataForm').addEventListener('submit', function(event) { event.preventDefault(); const amount = document.getElementById('amount').value; const date = document.getElementById('date').value; let entries = JSON.parse(localStorage.getItem('entries')) || []; entries.push({ amount, date }); localStorage.setItem('entries', JSON.stringify(entries)); addEntryToTable({ amount, date }); }); document.addEventListener('DOMContentLoaded', function() { const entries = JSON.parse(localStorage.getItem('entries')) || []; entries.forEach(entry => addEntryToTable(entry)); }); function addEntryToTable(entry) { const resultsTable = document.getElementById('resultsTable').getElementsByTagName('tbody')[0]; const row = resultsTable.insertRow(); const cellDate = row.insertCell(0); const cellAmount = row.insertCell(1); cellDate.textContent = entry.date; cellAmount.textContent = entry.amount; }
Our Location

304 North Cardinal St.
Dorchester Center, MA 02124

Pendants

Showing the single result