form submit without reloading page with validation js code example Example: submit form javascript without refresh event.preventDefault()