Skip to content

Commit 1b3679b

Browse files
Update article.md
1 parent 0616e89 commit 1b3679b

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

  • 2-ui/1-document/04-searching-elements-dom

2-ui/1-document/04-searching-elements-dom/article.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,17 @@ document.getElementsByTagName('input')[0].value = 5;
273273
</script>
274274
```
275275
276-
## Live collections
276+
## مجموعه‌های زنده
277277
278-
All methods `"getElementsBy*"` return a *live* collection. Such collections always reflect the current state of the document and "auto-update" when it changes.
278+
.می‌شوند update را منعکس می‌کنند و وقتی تغییر می‌کند، به صورت خودکار document یک مجموعه‌ی زنده برمی‌گردانند. چنین مجموعه‌هایی همیشه وضعیت فعلی `"getElementsBy*"` تمام متدهای
279279
280-
In the example below, there are two scripts.
280+
.داریم script در مثال زیر دو
281+
282+
283+
.ایجاد می‌کند در حال حاضر طول آن `1` است `<div>` اولی ارجاعی به مجموعه‌ی
284+
285+
دیگر را ببیند پس طول آن `2` است `<div>` زمانی اجرا می‌شود که مرورگر یک script دومین
281286
282-
1. The first one creates a reference to the collection of `<div>`. As of now, its length is `1`.
283-
2. The second scripts runs after the browser meets one more `<div>`, so its length is `2`.
284287
285288
```html run
286289
<div>First div</div>
@@ -299,9 +302,9 @@ In the example below, there are two scripts.
299302
</script>
300303
```
301304
302-
In contrast, `querySelectorAll` returns a *static* collection. It's like a fixed array of elements.
305+
.ها استelement را برمی‌گرداند که شبیه یک آرایه‌ی ثابت static یک مجموعه‌ی `querySelectorAll` ،متقابلا
303306
304-
If we use it instead, then both scripts output `1`:
307+
.خروجی `1` را می‌دهند script اگر به جایش از آن استفاده کنیم، هر دو
305308
306309
307310
```html run

0 commit comments

Comments
 (0)