Browse Source

Fix typo

main
Dan Abramov 2 years ago
parent
commit
e354061c82
  1. 2
      beta/src/content/reference/react-dom/components/select.md

2
beta/src/content/reference/react-dom/components/select.md

@ -223,7 +223,7 @@ select { display: block; margin-top: 10px; width: 200px; }
### Reading the select box value when submitting a form {/*reading-the-select-box-value-when-submitting-a-form*/} ### Reading the select box value when submitting a form {/*reading-the-select-box-value-when-submitting-a-form*/}
Add a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) around your textarea with a [`<button type="submit">`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button) inside. It will call your `<form onSubmit>` event handler. By default, the browser will send the form data to the current URL and refresh the page. You can override that behavior by calling `e.preventDefault()`. To read the form data, use [`new FormData(e.target)`](https://developer.mozilla.org/en-US/docs/Web/API/FormData). Add a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) around your select box with a [`<button type="submit">`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button) inside. It will call your `<form onSubmit>` event handler. By default, the browser will send the form data to the current URL and refresh the page. You can override that behavior by calling `e.preventDefault()`. To read the form data, use [`new FormData(e.target)`](https://developer.mozilla.org/en-US/docs/Web/API/FormData).
<Sandpack> <Sandpack>
```js ```js

Loading…
Cancel
Save