Design comparison
SolutionDesign
Community feedback
- @Navroz-SinghPosted 4 months ago
Your code is great but here is a mistake you should avoid.
-> You should've just made two separate html files and in the script tag of first file, you can directly send data (in this case, email) to second html file.
Include this in your first script file:
window.location.href = "index2.html?email=" + encodeURIComponent(email)
and then receive the email data in second script file:
let urlparameter = new URLSearchParams(window.location.search)
let email = urlparameter.get("email")
here you would recieve your email data in email variable.Hope it helps.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord