+ 1

How to make alert pop up when forum is submited

how to pop up an alert when the user fill the forum informations and click on submit

6th May 2019, 1:36 PM
Ouardi Yacine
Ouardi Yacine - avatar
12 odpowiedzi
+ 2
Use the onsubmit method. form.onsubmit = () => { window.alert("That's how it's done ") }
6th May 2019, 1:44 PM
Dlite
Dlite - avatar
+ 3
Perfect!!
6th May 2019, 3:34 PM
CodeFu
CodeFu - avatar
+ 2
HTML: <form> ... <input type="submit" value="submit" onclick="fun()"/> </form> JS: function fun() { alert("hi"); }
6th May 2019, 3:21 PM
CodeFu
CodeFu - avatar
+ 2
Ouardi Yacine tell me if it works
6th May 2019, 3:24 PM
CodeFu
CodeFu - avatar
+ 1
thanks I'll try it
6th May 2019, 2:13 PM
Ouardi Yacine
Ouardi Yacine - avatar
+ 1
Tell me if it works
6th May 2019, 2:15 PM
Dlite
Dlite - avatar
+ 1
it didn't
6th May 2019, 2:48 PM
Ouardi Yacine
Ouardi Yacine - avatar
+ 1
it did thanks
6th May 2019, 3:27 PM
Ouardi Yacine
Ouardi Yacine - avatar
+ 1
Please my answer the best,because I helped you!
6th May 2019, 3:36 PM
CodeFu
CodeFu - avatar
+ 1
done
6th May 2019, 4:11 PM
Ouardi Yacine
Ouardi Yacine - avatar
6th May 2019, 3:33 PM
Ouardi Yacine
Ouardi Yacine - avatar