0

DOM not working

When i press button == change text in <a> element, whole html disappears. Where is the problem? Edit: even when i don't chenge the text, just clicking the button, causes the problem https://code.sololearn.com/WM1uZ1AK2uQ9/?ref=app

20th Jan 2020, 7:31 AM
Maneren
Maneren - avatar
2 Answers
+ 2
add type="button" to your <button> tag: default type is "submit" wich imply form sending on click...
20th Jan 2020, 8:11 AM
visph
visph - avatar
0
visph yep, already got it, thx
24th Jan 2020, 12:31 PM
Maneren
Maneren - avatar