Skip to content

Commit e89483a

Browse files
committed
fix(reference): address review for react-dom input (PR #664)
Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
1 parent 946eda2 commit e89483a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • src/content/reference/react-dom/components

‎src/content/reference/react-dom/components/input.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ input { margin: 5px; }
245245
### Leggere i valori degli input all'invio di un form {/*reading-the-input-values-when-submitting-a-form*/}
246246

247247
Aggiungi un [`<form>`](https://developer.mozilla.org/it/docs/Web/HTML/Element/form) attorno ai tuoi input con un [`<button type="submit">`](https://developer.mozilla.org/it/docs/Web/HTML/Element/button) all'interno. Chiamerà il tuo gestore di eventi `<form onSubmit>`. Per impostazione predefinita, il browser invierà i dati del form all'URL corrente e aggiornerà la pagina. Puoi sovrascrivere questo comportamento chiamando `e.preventDefault()`. Leggi i dati del form con [`new FormData(e.target)`](https://developer.mozilla.org/en-US/docs/Web/API/FormData).
248+
248249
<Sandpack>
249250

250251
```js

0 commit comments

Comments
 (0)