0👍
I am not sure what you want to do but if you want to prevent your page from reload then you have to use
form.addEventListener('submit', (e)=>{
e.preventDefault()})
Here form is the input-submit form through which the message is send.
Source:stackexchange.com