title: How can I share JS variables between pages?
body: <p>So basically I have 2 html pages. 1 has a button and displays the numbers the button generates, the other page (2) only displays. Then I have a script.js file so both files can get the values there. The thing is that when I include page 2 on 1,  it gets the values, but when separated from page 1, it doesn't get any values even with the same script.</p>
  
  <p>So basically it's something like this</p>
  
  <p><strong>Page 1</strong></p>
  
  <blockquote>
    <p>id="nom" style="font-size: 100px; margin-bottom: 5px; text-align: center; 
        font-family:Arial; background: #FFFFF">1</p></p>
  </blockquote>
  
  <p>This one gets value from the button with the id (nom) and adds 1 to the number already there.</p>
  
  <p><strong>Page 2</strong></p>
  
  <p>Page two has the same code, but is not getting the values when i change them in page 1 with the buttons.</p>
  
  <p><strong>Script.js</strong></p>
  
  <pre><code>document.getElementById("nom").innerHTML = parseInt(document.getElementById("nom").innerHTML) + 1;
  </code></pre>
  
  <p>The output is done like this.
  p id="nom">1
  
  <p>So, this is basically it, i can't get the values on page 2 when I change them in page 1. Any help?</p>