You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/reference/react-dom/components/option.md
+20-20
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: "<option>"
4
4
5
5
<Intro>
6
6
7
-
The [built-in browser `<option>`component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)lets you render an option inside a [`<select>`](/reference/react-dom/components/select)box.
@@ -19,11 +19,11 @@ The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/
19
19
20
20
---
21
21
22
-
## Reference {/*reference*/}
22
+
## 参考 {/*reference*/}
23
23
24
24
### `<option>` {/*option*/}
25
25
26
-
The [built-in browser `<option>`component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)lets you render an option inside a [`<select>`](/reference/react-dom/components/select)box.
*[`disabled`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#disabled): A boolean. If `true`, the option will not be selectable and will appear dimmed.
44
-
*[`label`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#label): A string. Specifies the meaning of the option. If not specified, the text inside the option is used.
45
-
*[`value`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#value): The value to be used [when submitting the parent `<select>`in a form](/reference/react-dom/components/select#reading-the-select-box-value-when-submitting-a-form) if this option is selected.
* React does not support the `selected` attribute on `<option>`. Instead, pass this option's `value`to the parent [`<select defaultValue>`](/reference/react-dom/components/select#providing-an-initially-selected-option) for an uncontrolled select box, or [`<select value>`](/reference/react-dom/components/select#controlling-a-select-box-with-a-state-variable)for a controlled select.
Render a `<select>`with a list of `<option>` components inside to display a select box. Give each `<option>`a`value`representing the data to be submitted with the form.
0 commit comments