submit without refreshing javascript code example Example: submit form javascript without refresh event.preventDefault()