title: Reference a javascript variable in a div flag HTML
body: <p>I have some code using A login form and I need to reference a javascript variable inside a div. Here is the HTML.</p>
  
  <pre><code>    &lt;div class="div"
      variable="Variable Here?" 
      &lt;/div&gt;
  </code></pre>
  
  <p>Here is the javascript.</p>
  
  <pre><code>function setLoginFormVars(form) {
          localStorage.setItem('email', email = document.getElementById("email").value);
          localStorage.setItem('apikey', apikey = document.getElementById("apikey").value);
          window.location.href = 'miner.html';
        }
  </code></pre>
  
  <p>The javascript is in the file where the form is. The function <code>setLoginFormVars</code> Is run when the login button is clicked.</p>
  
  <p>How would I specify that it is a variable and is it even possible to do what im asking.</p>
  
  <p>Thank you.</p>
  
  <p>Nyle</p>