how to prevent reload on form submit in js code example Example: submit form javascript without refresh event.preventDefault()