@Towbee05Submitted 4 months ago
Navroz Singh
@Navroz-SinghAll comments
- @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