No video

The DOM: What's the Document Object Model?

  Рет қаралды 77,323

freeCodeCamp.org

freeCodeCamp.org

Күн бұрын

The DOM: What's the Document Object Model?
The DOM is the browser's internal, progrematic representation of a webpage. Languages like javascript allow you to modify the DOM, and thus the website without editing the HTML of the page.
Technically, the DOM is an API (application programming interface). There are many types of APIs, but this particular API interacts with XML and HTML documents. It's in charge of how those documents are accessed and manipulated.
Really, you can do a lot with the dom, and if you're already scripting in JS and jQuery, you're already doing it.
You can insert new things, elements, or alter style or content for elements that already exist.
This can be done with pure javascript, like:
document.getElementById(id)
element.getElementsByTagName(name)
document.createElement(name)
You can also use libraries like jQuery to simplify, standardize and automate manipulating the DOM, like:
$('#box2').append("This will be added to box2!")

Пікірлер: 45
The DOM: Style in the Header, Script in the Footer
1:53
freeCodeCamp.org
Рет қаралды 15 М.
What is a Server? (Deepdive)
17:51
LiveOverflow
Рет қаралды 175 М.
Yum 😋 cotton candy 🍭
00:18
Nadir Show
Рет қаралды 7 МЛН
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 20 МЛН
나랑 아빠가 아이스크림 먹을 때
00:15
진영민yeongmin
Рет қаралды 2,7 МЛН
The Truth about Rust/WebAssembly Performance
29:47
Greg Johnston
Рет қаралды 179 М.
Unix vs Linux
13:59
Gary Explains
Рет қаралды 1,6 МЛН
Playing Chess Everyday Until I Hit 2000 Elo : Day 382
18:03
A visual guide to Bayesian thinking
11:25
Julia Galef
Рет қаралды 1,7 МЛН
Rust and RAII Memory Management - Computerphile
24:22
Computerphile
Рет қаралды 225 М.
Rust for the impatient
10:43
No Boilerplate
Рет қаралды 695 М.
Where Does Bad Code Come From?
42:21
Molly Rocket
Рет қаралды 191 М.
Think Fast, Talk Smart: Communication Techniques
58:20
Stanford Graduate School of Business
Рет қаралды 39 МЛН
Computer Basics 18: How Source Code works
2:30
freeCodeCamp.org
Рет қаралды 60 М.