Skip to content

Commit 7f55860

Browse files
line 204
1 parent 9ffab51 commit 7f55860

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

2-ui/4-forms-controls/1-form-elements/article.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,25 +183,25 @@ input.checked = true; // radio button یا checkbox برای یک
183183
184184
:عرضه می‌کنند `<select>` کردن یک مقدار برای set آن‌ها سه راه مختلف برای
185185
186-
1. Find the corresponding `<option>` element (e.g. among `select.options`) and set its `option.selected` to `true`.
187-
2. If we know a new value: set `select.value` to the new value.
188-
3. If we know the new option number: set `select.selectedIndex` to that number.
186+
1. .قرار می‌دهد `true` آن را برابر `option.selected` و مقدار (برای مثال `select.options`) متناظر را پیدا می‌کند `<option>` عنصر
187+
2. .را برابر آن مقدار جدید قرار می‌دهد `select.value` اگر یک مقدار جدید را بدانیم:
188+
3. .را برابر آن عدد قرار می‌دهد `select.selectedIndex` جدید را بدانیم: مقدار option number اگر
189189
190-
Here is an example of all three methods:
190+
:اینجا مثالی از هر سه متد می‌بینیم
191191
192192
```html run
193193
<select id="select">
194-
<option value="apple">Apple</option>
195-
<option value="pear">Pear</option>
196-
<option value="banana">Banana</option>
194+
<option value="apple">سیب</option>
195+
<option value="pear">گلابی</option>
196+
<option value="banana">موز</option>
197197
</select>
198198
199199
<script>
200-
// all three lines do the same thing
200+
// تمام سه خط کار یکسانی انجام می‌دهند
201201
select.options[2].selected = true;
202202
select.selectedIndex = 2;
203203
select.value = 'banana';
204-
// please note: options start from zero, so index 2 means the 3rd option.
204+
// .option از صفر شروع می‌شوند، پس اندیس دو یعنی سومین options :لطفا دقت داشته باشید
205205
</script>
206206
```
207207

0 commit comments

Comments
 (0)