+ 1
What is the problem with this code? Output is not stable.
4 Respuestas
0
Morning ! ,
I have edited your code such that the output doesn't disappear. By output , I assumed you meant the whole page doesn't go crazy.
I have removed the method = "post" since you don't have any endpoint to post to.
I have removed the inline onClick and added an event listener on window load such that when clicked I get the click event as "e" which has a function "e.preventDefault();" to prevent the page from reloading .
Hope I have helped you. If you still have any queries , you can ask freely.
Code : https://code.sololearn.com/WA166A139a8A
Here's a cookie 🍪 , Have a good day
+ 1
Ćheyat after submitting the form, the output is disappeared
+ 1
Thank You Ćheyat. Problem resolved! I have edited again so that the output is shown in Output box.
0
By not stable , you mean? 🤔🤔