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
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -238,16 +238,16 @@ input.checked = true; // radio button یا checkbox برای یک
238
238
option = new Option(text, value, defaultSelected, selected);
239
239
```
240
240
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 این
242
242
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` اگر
247
247
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` تفاوت بین
249
249
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` در عمل باید معمولا _هر دو_ مقدار
0 commit comments