Public Access
0
0

Обновить js/DOM/Функции.md

This commit is contained in:
2026-04-27 10:25:29 +00:00
parent be5351982d
commit 9557a826ad

View File

@@ -1,4 +1,3 @@
- Получить элемент. Его нет, возвращаем null - Получить элемент. Его нет, возвращаем null
```js ```js
@@ -6,3 +5,11 @@ function getEl(el){
return document.querySelector(el) ?? null; return document.querySelector(el) ?? null;
} }
``` ```
- Загрузка скрипта после полной загрузки документа
```js
document.addEventListener('DOMContentLoaded', function() {
})
```