+ 2

Why are the results just flashing on to the screen then clearing immediatly after just a few seconds

https://code.sololearn.com/WUa2NwSRC36G

6th Jul 2020, 6:53 AM
Joshua Flynn
Joshua Flynn - avatar
4 Antworten
+ 2
type="submit" on the submit button automatically causes the form to send a POST http request. changing this to type="button" stops that from happening. Adding onsubmit="event.preventDefault();" to the form is another solution
6th Jul 2020, 7:05 AM
JME
+ 1
JME the second is actually the best solution. Because, the first won't respond to the user pressing the enter key
6th Jul 2020, 2:12 PM
Sajid
Sajid - avatar
0
My results are not clearing
6th Jul 2020, 7:03 AM
Sajid
Sajid - avatar
0
What do you guys think of it
6th Jul 2020, 7:09 AM
Joshua Flynn
Joshua Flynn - avatar