<script> var pippo=false; </script>
Poi metti in ogni campo del form:
onchange="if(this.value!=this.defaultValue)pippo=t rue"
e nel form
<form ... onsubmit="pippo=false">
infine nel body:
<body ... onunload="if(pippo)alert('Hai perso le modifiche!')">
In molti casi potresti gestire l'evento onbeforeunload sul body e riuscire ad impedire che si lasci la pagina, fino a poco tempo fa funzionava solo su IE, ora sinceramente non sono aggiornato![]()

Rispondi quotando