Skip to content

Commit d97ae91

Browse files
line 250
1 parent 25d2ba8 commit d97ae91

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,16 +238,16 @@ input.checked = true; // radio button یا checkbox برای یک
238238
option = new Option(text, value, defaultSelected, selected);
239239
```
240240
241-
This syntax is optional. We can use `document.createElement('option')` and set attributes manually. Still, it may be shorter, so here are the parameters:
241+
:را به صورت دستی مقداردهی کنیم. با این حال،‌ ممکن است کوتاه‌تر باشد پس اینجا پارامترها وجود دارند attributes استقاده کنیم و `document.createElement('option')` اختیاری است، ما می‌توانیم از syntax این
242242
243-
- `text` -- the text inside the option,
244-
- `value` -- the option value,
245-
- `defaultSelected` -- if `true`, then `selected` HTML-attribute is created,
246-
- `selected` -- if `true`, then the option is selected.
243+
- `text` -- option متن درون,
244+
- `value` -- option مقدار,
245+
- `defaultSelected` -- ایجاد می‌شود `selected` HTML-attribute باشد `true` اگر
246+
- `selected` -- انتخاب می‌شود option باشد `true` اگر
247247
248-
The difference between `defaultSelected` and `selected` is that `defaultSelected` sets the HTML-attribute (that we can get using `option.getAttribute('selected')`, while `selected` sets whether the option is selected or not.
248+
.انتخاب شده است یا نه option مشخص می‌کند که آیا `selected` در حالی که (آن را بگیریم `option.getAttribute('selected')` که ما می‌توانیم با) می‌کند set را HTML-attribute مقدار `defaultSelected` در این است که `selected` و `defaultSelected` تفاوت بین
249249
250-
In practice, one should usually set _both_ values to `true` or `false`. (Or, simply omit them; both default to `false`.)
250+
(`false` یا به سادگی حذف شوند، مقدار پیش‌فرض هر دو) .باشند `false` یا `true` در عمل باید معمولا _هر دو_ مقدار
251251
252252
For instance, here's a new "unselected" option:
253253

0 commit comments

Comments
 (0)