I need a form saved in localstorage
to be loaded on another page inside a table, but I'm not exactly sure how to do that, the more I can load it on the same form page, the last saved data.
Code using:
function carregarDados() {
if (localStorage.length > 0) {
$("#tit_monografia").val(localStorage.getItem("tit_monografia"));
$("#nome_autor").val(localStorage.getItem("nome_autor"));
$("#nome_orientador").val(localStorage.getItem("nome_orientador"));
$("#area").val(localStorage.getItem("area"));
$("#ano").val(localStorage.getItem("ano"));
$("#cidade").val(localStorage.getItem("cidade"));
$("#resumo").val(localStorage.getItem("resumo"));
} else {
alert("Nenhum registro encontrado");
}
}
Does anyone know how I can resolve?