How to redirect to a new page after form submission in Js? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Resposta
0
You could use a link with the submit button
12th May 2022, 12:50 PM
Lisa
Lisa - avatar