The JavaScript DOM explained in 5 minutes! 🌳

preview_player
Показать описание
#JavaScript #tutorial #course

// DOM = DOCUMENT OBJECT MODEL
// Object{} that represents the page you see in the web browser
// and provides you with an API to interact with it.
// Web browser constructs the DOM when it loads an HTML document,
// and structures all the elements in a tree-like representation.
// JavaScript can access the DOM to dynamically
// change the content, structure, and style of a web page.
Рекомендации по теме
Комментарии
Автор

// DOM = DOCUMENT OBJECT MODEL
// Object{} that represents the page you see in the web browser
// and provides you with an API to interact with it.
// Web browser constructs the DOM when it loads an HTML document,
// and structures all the elements in a tree-like representation.
// JavaScript can access the DOM to dynamically
// change the content, structure, and style of a web page.

console.log(document);
console.dir(document);

document.title = "My website";
= "hsl(0, 0%, 15%)";

const username = "";
const welcomeMsg =
welcomeMsg.textContent += username === "" ? `Guest` : username;

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1 id="welcome-msg">Welcome </h1>
<script src="index.js"></script>
</body>
</html>

BroCodez
Автор

Bro, this is the first time I've really understood how the DOM works. Thanks for the clear and simple breakdown of such a complex concept.

kenkioqqo
Автор

I learnt html and css easily by your videos ❤ now I'm trying to learn js 🙏

AnalPro_
Автор

crazy good introduction, incredible I watched a 3 hour tutorial and didnt even scratch this, thx again

ok_ew
Автор

so clear and explanatory!! thank you for this video!!

Ryan-mkch
Автор

that is such a good explanation

bro fr knows the bro code

itsshafayat
Автор

Thank you so so so much <3 I am getting so much better at javascript just because of your

AmjadGD
Автор

please keep doing what you're doing bro🙏🏻

realoogabooga
Автор

This is soo clear explanation broooo! Thank you!!!!

dustmukhammad
Автор

All I can say is _Understandable and have a good day_

ikuubi
Автор

Surprise Surprise mfs the King is back👑

kushagrarai
Автор

for what purpose u use
: sign use on line .

GoalDigger-footboll
Автор

i want to hit the mute button how do i use DOM to mute desktop audio???

Автор

0:07 DOM is not a JS object, but it represent the page we see in the browser

chathuraranasingha
Автор

every time i code document.getelementbyId the console says document is not defined. how could i overcome this problem. im using node.js

sangeethasancharaya