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
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,8 +161,8 @@ For instance:
161
161
مثل این:
162
162
163
163
```js
164
-
input.value = "New value";
165
-
textarea.value = "New text";
164
+
input.value = "جدید value";
165
+
textarea.value = "جدید text";
166
166
167
167
input.checked = true; // radio button یا checkbox برای یک
168
168
```
@@ -173,7 +173,7 @@ input.checked = true; // radio button یا checkbox برای یک
173
173
.که در ابتدا در صفحه بوده را ذخیره میکند، نه مقدار فعلی را HTML آن فقط
174
174
```
175
175
176
-
### select and option
176
+
### select و option
177
177
178
178
:مهم دارد property سه `<select>` element یک
179
179
@@ -205,11 +205,11 @@ input.checked = true; // radio button یا checkbox برای یک
205
205
</script>
206
206
```
207
207
208
-
Unlike most other controls, `<select>` allows to select multiple options at once if it has `multiple` attribute. This attribute is rarely used, though.
208
+
.به ندرت استفاده میشود attribute به طور همزمان انتخاب شوند. با این حال، این option داشته باشد، اجازه میدهد که چند attribute `چند` `<select>` های دیگر اگرcontrol برعکس بیشتر
209
209
210
-
For multiple selected values, use the first way of setting values: add/remove the `selected` property from `<option>` subelements.
210
+
.حذف/به آن اضافه کنید `<option>` subelements را از `selected` property برای چندین مقدار انتخاب شده، از روش اول برای تنظیم مقادیر استفاده کنید
211
211
212
-
Here's an example of how to get selected values from a multi-select:
212
+
:مقدار انتخابشده را به دست آوریم ،multi-select اینجا یک مثال داریم از اینکه چگونه از یک
213
213
214
214
```html run
215
215
<select id="select" *!*multiple*/!*>
@@ -219,7 +219,7 @@ Here's an example of how to get selected values from a multi-select:
219
219
</select>
220
220
221
221
<script>
222
-
// get all selected values from multi-select
222
+
// multi-select گرفتن تمام مقادیر انتخابشده از
223
223
let selected = Array.from(select.options)
224
224
.filter(option => option.selected)
225
225
.map(option => option.value);
@@ -228,11 +228,11 @@ Here's an example of how to get selected values from a multi-select:
228
228
</script>
229
229
```
230
230
231
-
The full specification of the `<select>` element is available in the specification <https://html.spec.whatwg.org/multipage/forms.html#the-select-element>.
231
+
.موجود است <https://html.spec.whatwg.org/multipage/forms.html#the-select-element> در مشخصات `<select>` element مشخصات کامل
232
232
233
-
### new Option
233
+
### جدید Option
234
234
235
-
In the [specification](https://html.spec.whatwg.org/multipage/forms.html#the-option-element) there's a nice short syntax to create an `<option>` element:
235
+
:وجود دارد <option>` element کوتاه و زیبا برای ایجاد یک syntax یک [مشخصات](https://html.spec.whatwg.org/multipage/forms.html#the-option-element) در
236
236
237
237
```js
238
238
option = new Option(text, value, defaultSelected, selected);
0 commit comments