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