sql >> Base de Datos >  >> RDS >> Mysql

Continúe llenando el formulario HTML después de cerrar y volver a abrir

aquí hay un ejemplo de formulario con autocompletar que puede usar localstorage

 <input id="FirstName" type="text" name="FirstName" class="field-style" placeholder="First Name" required onchange="save()"/> 

 <script>
// Check browser support
if (typeof(Storage) !== "undefined") {
    if(localStorage.getItem("FirstName")!=""){

    }else{
    // Store
        localStorage.setItem("FirstName", "Hitesh");
    }
    // Retrieve
    document.getElementById("FirstName").value = localStorage.getItem("FirstName");
} else {
    document.getElementById("FirstName").value = "Sorry, your browser does not support Web Storage...";
}
 function save(){
    var name = document.getElementById('FirstName').value;
  localStorage.setItem("FirstName", name);
 }    
  </script>