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: 2-ui/4-forms-controls/1-form-elements/article.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -181,7 +181,7 @@ A `<select>` element has 3 important properties:
181
181
2. `select.value` -- the value of the currently selected `<option>`,
182
182
3. `select.selectedIndex` -- the number of the currently selected `<option>`.
183
183
184
-
So we have three ways to set the value of a `<select>`, that do the same:
184
+
They provide three different ways of setting a value for a `<select>`:
185
185
186
186
1. Find the corresponding `<option>` element and set `option.selected` to `true`.
187
187
2. Set `select.value` to the value.
@@ -206,7 +206,7 @@ Here is an example:
206
206
</script>
207
207
```
208
208
209
-
Unlike most other controls, `<select>` allows to select multiple options at once if it has `multiple` attribute. That's feature is rarely used. In that case we need to use the first ways: add/remove the `selected` property from `<option>` subelements.
209
+
Unlike most other controls, `<select>` allows to select multiple options at once if it has `multiple` attribute. That's feature is rarely used. In that case we need to use the first way: add/remove the `selected` property from `<option>` subelements.
210
210
211
211
We can get their collection as `select.options`, for instance:
0 commit comments