|
1 |
| -There are many ways to do it. |
| 1 | +এটি অনেকভাবে করা যায়। |
2 | 2 |
|
3 |
| -Here are some of them: |
| 3 | +এখানে দেখুন: |
4 | 4 |
|
5 | 5 | ```js
|
6 | 6 | // 1. The table with `id="age-table"`.
|
7 | 7 | let table = document.getElementById('age-table')
|
8 | 8 |
|
9 |
| -// 2. All label elements inside that table |
| 9 | +// 2. table এর মধ্যে সকল `label` এলিমেন্ট |
10 | 10 | table.getElementsByTagName('label')
|
11 |
| -// or |
| 11 | +// বা |
12 | 12 | document.querySelectorAll('#age-table label')
|
13 | 13 |
|
14 |
| -// 3. The first td in that table (with the word "Age") |
| 14 | +// 3. *table* এর প্রথম `td` (with the word "Age") |
15 | 15 | table.rows[0].cells[0]
|
16 |
| -// or |
| 16 | +// বা |
17 | 17 | table.getElementsByTagName('td')[0]
|
18 |
| -// or |
| 18 | +// বা |
19 | 19 | table.querySelector('td')
|
20 | 20 |
|
21 |
| -// 4. The form with the name "search" |
22 |
| -// assuming there's only one element with name="search" in the document |
| 21 | +// 4. `form` এলিমেন্ট যার `name="search"` |
| 22 | +// ধরে নিন DOM এ একটি মাত্র name="search" এলিমেন্ট আছে |
23 | 23 | let form = document.getElementsByName('search')[0]
|
24 |
| -// or, form specifically |
| 24 | +// বা, |
25 | 25 | document.querySelector('form[name="search"]')
|
26 | 26 |
|
27 |
| -// 5. The first input in that form. |
| 27 | +// 5. `form` এর প্রথম `input` এলিমেন্ট. |
28 | 28 | form.getElementsByTagName('input')[0]
|
29 |
| -// or |
| 29 | +// বা |
30 | 30 | form.querySelector('input')
|
31 | 31 |
|
32 |
| -// 6. The last input in that form |
33 |
| -let inputs = form.querySelectorAll('input') // find all inputs |
34 |
| -inputs[inputs.length-1] // take the last one |
| 32 | +// 6. `form` এর শেষ `input` এলিমেন্ট |
| 33 | +let inputs = form.querySelectorAll('input') // সকল ইনপুট |
| 34 | +inputs[inputs.length-1] // শেষ এলিমেন্টটি নেয়া |
35 | 35 | ```
|
0 commit comments