Skip to content
Advertisement

the purpose of this code is to add an article at the end of the page, but the broblem is that appear then it desappear

the purpose of this code is to add an article at the end of the page, but the broblem is that appear then it desappear.please help me to figur it out πŸ™‚

JavaScript
JavaScript

Advertisement

Answer

This is because you are using a form without preventing the submit of it. There is no need for the form here, and by default it will submit to the same page it’s on, causing a window reload.

This has been discussed here: How to prevent form from being submitted?

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement