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