Skip to content

Commit 722b851

Browse files
line 32
1 parent 791ffdf commit 722b851

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

  • 2-ui/4-forms-controls/3-events-change-input

2-ui/4-forms-controls/3-events-change-input/article.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
# Events: change, input, cut, copy, paste
22

3-
Let's cover various events that accompany data updates.
3+
بیایید eventهای مختلفی که همراه با آپدیت داده‌ها هستند پوشش دهیم.
44

55
## Event: change
66

7-
The `change` event triggers when the element has finished changing.
7+
وقنی که تغییر یک element تمام می‌شود، `change` event فعال می‌شود.
88

9-
For text inputs that means that the event occurs when it loses focus.
9+
برای text inputها این یعنی که event زمانی اتفاق می‌افتد که focus را از دست می‌دهد.
1010

11-
For instance, while we are typing in the text field below -- there's no event. But when we move the focus somewhere else, for instance, click on a button -- there will be a `change` event:
11+
برای مثال وقتی که ما داریم در text field زیر تایپ می‌کنیم -- هیچ eventای وجود ندارد. اما وقتی focus را به جایی دیگر منتقل می‌کنیم، برای مثال، روی یک button کلیک می‌کنیم، یک `change` event به وجود خواهد آمد:
1212

1313
```html autorun height=40 run
1414
<input type="text" onchange="alert(this.value)">
1515
<input type="button" value="Button">
1616
```
1717

18-
For other elements: `select`, `input type=checkbox/radio` it triggers right after the selection changes:
18+
برای دیگر elementها: `select` و `input type=checkbox/radio` دقیقا بعد از آن که انتخاب تغییر می‌کند فعال می‌شود:
1919

2020
```html autorun height=40 run
2121
<select onchange="alert(this.value)">
22-
<option value="">Select something</option>
23-
<option value="1">Option 1</option>
24-
<option value="2">Option 2</option>
25-
<option value="3">Option 3</option>
22+
<option value="">چیزی را انتخاب کنید</option>
23+
<option value="1">انتخاب 1</option>
24+
<option value="2">انتخاب 2</option>
25+
<option value="3">انتخاب 3</option>
2626
</select>
2727
```
2828

2929

3030
## Event: input
3131

32-
The `input` event triggers every time after a value is modified by the user.
32+
هر بار پس از آن که یک مقدار توسط کاربر تغییر می‌کند، `input` event فعال می‌شود.
3333

3434
Unlike keyboard events, it triggers on any value change, even those that does not involve keyboard actions: pasting with a mouse or using speech recognition to dictate the text.
3535

0 commit comments

Comments
 (0)