-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
30 lines (25 loc) · 935 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// function successPage() {
// // form.getElementById("email-output").value = document.getElementById("email").value;
// let email = document.getElementById("email").value;
// alert(email);
// }
// function display (form) {
// alert(email);
// form.emailOutput.value = document.getElementById("email").value;
// return false;
// }
// function homePage() {
// window.location.href="index.html"
// }
document.addEventListener('DOMContentLoaded', function() {
// const emailForm = document.getElementById("emailForm");
const submitButton = document.getElementById("submitButton");
submitButton.addEventListener('click', function () {
const emailInput = document.getElementById("email");
const userEmail = emailInput.value;
if (userEmail) {
localStorage.setItem('userEmail',userEmail);
window.location.href = 'success.html';
}
});
});