/
Codeboy1
/
lab6
Обзор
Документация
Войти
/
Codeboy1
/
lab6
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
4.html
26 строк
1 KB
Codeboy1
create: 1.html, 2.html, 3.html, 4.html, 5.html, 6.html, 7.html, 8.html, 9.html
01 апр 2026, 14:10
Верифицирован
01 апр 2026, 14:10
b887c38
Код
Авторство
О чём код?
// 1. Таблица с id="age-table" const ageTable = document.getElementById('age-table'); console.log('Таблица age-table:', ageTable); // 2. Все элементы label внутри этой таблицы (их три) const labelsInTable = ageTable.querySelectorAll('label'); console.log('Все label внутри таблицы:', labelsInTable); console.log('Количество label:', labelsInTable.length); // 3 // 3. Первый td в этой таблице (со словом «Age») const firstTd = ageTable.querySelector('td'); console.log('Первый td:', firstTd); console.log('Текст первого td:', firstTd.textContent); // "Age" // 4. Форма form с именем name="search" const searchForm = document.forms.search; // или document.querySelector('form[name="search"]') console.log('Форма search:', searchForm); // 5. Первый input в этой форме const firstInput = searchForm.querySelector('input'); console.log('Первый input в форме:', firstInput); // 6. Последний input в этой форме const allInputs = searchForm.querySelectorAll('input'); const lastInput = allInputs[allInputs.length - 1]; console.log('Последний input в форме:', lastInput);