How to get updated input value and send to another page html

0

Good morning,

I'm getting data from a form as follows:

function save(){
    window.localStorage.setItem('nome', $('#nome').val());
    window.localStorage.setItem('sobrenome', $('#sobrenome').val());
    window.localStorage.setItem('email', $('#email').val());
}
function load(){
    $('#nome').val(window.localStorage.getItem('nome'));
    $('#sobrenome').val(window.localStorage.getItem('sobrenome'));
    $('#email').val(window.localStorage.getItem('email'));
}

and not html

pag1:

<body onload="save()" onunload="save()">

on pag2

<body onload="load()">

The problem is that on the second page the values can not be changed, would you have any way to change the values? and if necessary I could send the changed values to another page "for a third page"?

    
asked by anonymous 28.08.2018 / 15:49

0 answers