how to prevent the behaviour of form to reload page after submitting the form using javascript code example Example: submit form javascript without refresh event.preventDefault()