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