The DOM and an interactive transaction form
Let a person use the ledger
The DOM is the browser's object model for the page. JavaScript can listen for a form submission, read its fields, update application state, and render the new result.
This is the turning point: Smart Ledger stops being a script and becomes an application.
Istruzioni
Select the form and list with querySelector.
Suggerimento: document.querySelector('#transaction-form')
Dove va scritto?
// Listen for submit, prevent the refresh, push an object, and render.Scrivilo alla riga 6: sotto quel commento, dopo il codice che hai già aggiunto.
Create renderTransactions and render array items with map.
Listen for submit and call preventDefault.
Push a transaction object and render again.
Il tuo codice
Descrivi ciò che vuoi creare per questo passaggio e scriverò il codice — poi clicca su Applica per inserirlo nel tuo editor. Questo passaggio: Select the form and list with querySelector.