0

I have this for js:

function storingValue() {

   if (typeof (storage) ) != "undefined" {
       //store
       var fname= document.getElementById("fname");
       localStorage.setItem("fname",fname);

       document.getElementById("Form").innerHTML = localStorage.getItem("username");
       document.write('<a href ="storage.html" > next page </a>");
   }else {

       document.getElementById("Form").innerHTML="Sorry, your browser does not support Web storage";    
  }
}

and I have this on my html :

<form name="Form" action="storage.html" onsubmit="return validateForm()" method="post">

my question is How do I output what I saved to another page? I know that it has something to do with action="", but I'm not sure how it works. Can I create another html page and link it?

mrvncaragay
  • 1,240
  • 1
  • 8
  • 15
jen
  • 1

0 Answers0