7? ?: JavaScript? DOM ??
??: 2024? 12? 14?
JavaScript ?? ?? 7??? ?? ?? ?????! ??? ??? JavaScript? ?? ???? ?? ? ??? DOM ??? ??? ???. DOM ??? ?? ????? ??? ???? ????, ?? ?? ???? ??? ? ??? ???? ???? ?? ? ????. ?? ??? ??? ??? To-Do List ????? ???? ??? ??? ??? ? ? ????.
1. DOM?? ??????
?? ?? ??(DOM)? ? ??? ????? ????????. HTML ??? ??? ?? ??? ????? JavaScript? ???? ????? ???? ??? ????? ??? ? ????.
??? DOM? HTML? ???? ??? ????.
<html> <body> <h1>Welcome</h1> <p>This is a paragraph.</p> </body> </html>
?? DOM ??? ??? ????.
Document └── html └── body ├── h1 └── p
2. DOM ?? ???
?? ?? ??? ???? DOM? ??? ???? ? ????.
getElementById ??
let title = document.getElementById("title"); console.log(title); // Logs the element with ID "title"
getElementsByClassName ??
let items = document.getElementsByClassName("item"); console.log(items); // Logs all elements with class "item"
querySelector ? querySelectorAll ??
let firstItem = document.querySelector(".item"); // First element with class "item" let allItems = document.querySelectorAll(".item"); // All elements with class "item"
3. DOM ?? ??
??? ??
??? ???? ?? ??? ???? HTML? ????? ? ????.
- innerText: ???? ???? ???????.
- innerHTML: HTML ???? ???????.
let title = document.getElementById("title"); title.innerText = "Updated Title"; // Changes visible text title.innerHTML = "<strong>Updated Title</strong>"; // Adds HTML formatting
??? ??
??? CSS ???? ?? ??? ? ????.
let title = document.getElementById("title"); title.style.color = "blue"; title.style.fontSize = "24px";
?? ?? ?? ??
let box = document.getElementById("box"); box.classList.add("highlight"); // Adds a class box.classList.remove("highlight"); // Removes a class
4. ??? ??
???? ???? ????? ????? ?? ? ????. ??? ? ?? ???? ??? ??? ?? ???? ?????.
??? ??? ??
HTML:
<button onclick="alert('Button Clicked!')">Click Me</button>
addEventListener ??
? ?? ??? JavaScript? HTML? ????? ?????.
let button = document.getElementById("btn"); button.addEventListener("click", function () { alert("Button Clicked!"); });
????
- ??: ??? ???? ??????.
- mouseover: ???? ?? ?? ??? ? ??????.
- keyup: ?? ?? ? ??????.
?:
<html> <body> <h1>Welcome</h1> <p>This is a paragraph.</p> </body> </html>
5. ????: ? ? ??
?? ??? ??? To-Do List ??????? ??? ???.
HTML ??
Document └── html └── body ├── h1 └── p
?? ??
- ???? ?? ??? ??? ?????.
- '?? ??'? ???? ?
- ??? ?? ?????.
- ? ???? ??? ??? ? ?? "??" ??? ????.
6. ?? ???
- DOM ???: getElementById ? querySelector? ?? ???? ?????.
- DOM ??: ???, ???, ???? ???? ?????.
- ??? ??: addEventListener? ???? ???? ????? ????.
- ?? ????: ??? ???? ?? ? ? ??? ?????.
7?? ?? ??
- ? ? ??? '??? ??' ??? ?????.
- ???? ??? ??? ??? ? ?? ?? ?? ?? ????.
- ?? ?????? mouseover ? keydown? ?? ??? ??? ??? ???.
?? ??
?? 8???? ?? ?? ? ???? ?? ???? JavaScript ???? ??? ?? ??? ???? ??? ?????. ?? ? ???!
? ??? JavaScript? DOM ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











JavaScript?? ??? ??? ?? ? ? ?? ??? ???????. 1. ?? ??? ??? ???? ?? ??? ????. ISO ?? ???? ???? ???? ???? ?? ????. 2. ?? ??? ?? ???? ??? ?? ???? ??? ? ??? ? ?? 0?? ????? ?? ??????. 3. ?? ?? ???? ???? ???? ?? ?????? ??? ? ????. 4. Luxon? ?? ???? ???? ?????? ???? ?? ????. ??? ?? ???? ????? ???? ??? ????? ?? ? ????.

TAGGSATTHEBOTTOMOFABLOGPOSTORWEBPAGESERVESPRACTICALPURSEO, USEREXPERIENCE, andDESIGN.1.ITHELPSWITHEOBYOWNSESPORENGENSTOESTOCESKESKERKESKERKERKERDER-RELEVANTTAGSWITHOUTHINGTEMAINCONTENT.2.ITIMPROVESEREXPERKEEPINGTOPONTEFOCUSOFOFOFOCUSOFOFOFOCUCUSONTHEATECLL

??? ?? ? ??? DOM?? ??? ??? ? ?????. ??? ?? ????? ?? ??????, ??? ?? ???? ?? ????????. 1. ??? ??? addeventListener? usecapture ?? ??? true? ???? ?????. 2. ??? ??? ?? ???? usecapture? ???? ????? ?????. 3. ??? ??? ??? ??? ???? ? ??? ? ????. 4. ??? ?? ?? ?? ??? ?? ??? ??????? ??? ???? ?????. 5. ??? ?? ?? ?? ??? ?? ???? ?? ???? ? ??? ? ????. ? ? ??? ???? ???? JavaScript? ??? ??? ??? ????? ???? ???? ??? ??????.

JavaScript ?? ????? ??????? ??? ?? ??? ??? ????? ?? ??? ????. ????? ??? ?????. 1. ?? ?? (CodesPlitting) ??, ?? ??? React.lazy ()? ?? ?? ?? ?? ??? ????? ??? ???? ? ?? ????? ??? ?? ??? ???????. 2. ???? ?? ?? (???)? ????, ES6 ?? ????? ???? "Dead Code"? ???? ?? ? ????? ?? ??? ??? ? ???????. 3. ?? ??? ???? ???? GZIP/BROTLI ? TERSER? JS? ???? ??? ????? ???? ?? ???? ??? ? ? ??????. 4. ??? ???? ???? day.js ? fetch? ?? ?? ?????? ??????.

ES ??? CommonJS? ?? ???? ?? ?? ? ?? ???????. 1. Commonjs? ????????? Node.js ?? ? ??? ?????. 2.ES ??? ???????? ????? ?? ???? ??? ?????. 3. ??, ES ??? ?? ??/????? ???? ??? ??? ?????? CommonJS? Quiew/Module.exports? ???? ???? ???? ?? ? ? ????. 4. Commonjs? Express? ?? ???? Node.js ? ?????? ?? ???? ?? ???? ?? ES ??? ?? ??? ?? ??? ?? ? Node.jsv14? ?????. 5. ?? ? ? ??? ?? ??? ??? ? ????.

Node.js?? HTTP ??? ???? ? ?? ???? ??? ????. 1. ?? ????? ????? ??? ??? ? ?? ????? ?? ?? ? https.get () ??? ?? ??? ??? ? ?? ????? ?? ??? ?????. 2.axios? ??? ???? ? ?? ??????. ??? ??? ??? ??? ??? ??? ???/???, ?? JSON ??, ???? ?? ?????. ??? ?? ??? ????? ?? ????. 3. ?? ??? ??? ??? ??? ???? ???? ??? ??? ???? ?????.

JavaScript? ??? ?? ????? ??? ?? ??? ??? ?? ?? ?? ????? ?? ???? ???? ?????. ??? ?? ???? ?? ??? ?? ??? ???? ???? ?? ?? ???? ???? ?????. ?? ??, ??? ? ?? ???? ??? (? : ??? null? ??) ?? ??? ????? ??????. ??? ??? ???? ??? ??? ????. closure?? ?? ??? ?? ??; ? ??? ??? ?? ?? ???? ?? ???? ????. V8 ??? ?? ???, ?? ??, ??/?? ???? ?? ??? ?? ??? ??? ????? ?? ??? ?? ??? ????. ?? ?? ???? ??? ??? ??? ??? ???? ????? ?? ?? ???? ?? ???????.

VAR, Let ? Const? ???? ??, ?? ? ?? ?????. 1.var? ?? ??????? ?? ???? ?? ? ??? ?????. 2. let? ?? ?? ????? ?? ?? ???? ?? ? ??? ???? ????. 3. ???? ?? ?? ???? ?? ??????? ? ?? ? ? ??? ?? ??? ?? ?? ??? ? ????. ?? const? ???? ??? ??? ? LET? ???? VAR? ???? ????.
