How to redirect to a new page after form submission in Js? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

How to redirect to a new page after form submission in Js?

I was playing with html forms. If we want to open a new page after form submission, we can use its action attribute. But from what I know, that's where you add link to server for data submission. Now I want to submit data as well as open a new page. For that I used onclick, onsubmission events of js. But I think that doesn't submits the form data. So how can I make that happen?

12th May 2022, 12:17 PM
𝕊𝕠𝕙𝕒𝕚𝕓 𝔸𝕙𝕞𝕒𝕕
𝕊𝕠𝕙𝕒𝕚𝕓 𝔸𝕙𝕞𝕒𝕕 - avatar
1 Respuesta
0
You could use a link with the submit button
12th May 2022, 12:50 PM
Lisa
Lisa - avatar