Come svuotare un modulo dopo l'invio
Updated December 10, 2025
Se vuoi che il tuo modulo venga svuotato dopo l’invio, in modo che se gli utenti fanno clic sul link “Go Back” il contenuto venga rimosso, aggiungi il seguente Javascript al tuo sito.
window.onbeforeunload = () => {
for(const form of document.getElementsByTagName('form')) {
form.reset();
}
}