Skip to content

Commit 853c973

Browse files
Update article.md
1 parent 6ca9e97 commit 853c973

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

2-ui/4-forms-controls/2-focus-blur/article.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555

5656
## متدهای focus/blur
5757

58-
Methods `elem.focus()` and `elem.blur()` set/unset the focus on the element.
58+
تابع‌های `elem.focus()` و `elem.blur()` برای این هستند که focus را روی element فعال/غیرفعال کنند.
5959

60-
For instance, let's make the visitor unable to leave the input if the value is invalid:
60+
برای مثال، بیایید کاری کنیم که اگر مقدار نامعتبر باشد، نتواند input را ترک کند:
6161

6262
```html run autorun height=80
6363
<style>
@@ -66,16 +66,16 @@ For instance, let's make the visitor unable to leave the input if the value is i
6666
}
6767
</style>
6868

69-
Your email please: <input type="email" id="input">
70-
<input type="text" style="width:220px" placeholder="make email invalid and try to focus here">
69+
ایمیلتان لطفا: <input type="email" id="input">
70+
<input type="text" style="width:220px" placeholder="کنید focus ایمیل را نامعتبر کنید و سعی کنید اینجا">
7171

7272
<script>
7373
input.onblur = function() {
74-
if (!this.value.includes('@')) { // not email
75-
// show the error
74+
if (!this.value.includes('@')) { // نیست email
75+
// را نشان می‌دهد error
7676
this.classList.add("error");
7777
*!*
78-
// ...and put the focus back
78+
// ... را برگردانید focus و
7979
input.focus();
8080
*/!*
8181
} else {

0 commit comments

Comments
 (0)