The JavaScript DOM explained in 5 minutes! 🌳
ฝัง
- เผยแพร่เมื่อ 6 ก.ย. 2024
- #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";
document.body.style.backgroundColor = "hsl(0, 0%, 15%)";
const username = "";
const welcomeMsg = document.getElementById("welcome-msg");
welcomeMsg.textContent += username === "" ? `Guest` : username;
Document
Welcome
Your video is good with clear explanations and it's easy for me to understand the code. I love it.
bro make ai video
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.
I learnt html and css easily by your videos ❤ now I'm trying to learn js 🙏
Great explanation. If you made an HTML version and a CSS version of this video, then combine all 3 into a playlist, it'd be a great introduction for anyone looking to code.
I love the way you break down the stuff and have a simplification at the top. You keep things simple so ppl underdstand rather than copy. Bro Thanks.
crazy good introduction, incredible I watched a 3 hour tutorial and didnt even scratch this, thx again
short simple videos are always better because you can just practice and mess around after with the information you learnt
Alot support for you bro❤
so clear and explanatory!! thank you for this video!!
Thank you so so so much
Best explanation...ever.
that is such a good explanation
bro fr knows the bro code
please keep doing what you're doing bro🙏🏻
This is soo clear explanation broooo! Thank you!!!!
Awesome video😎😎👍👍
Nice tutorial
Cheers for this tutorial.
All I can say is _Understandable and have a good day_
Great video !
for what purpose u use
: sign use on line .
Thank you
Surprise Surprise mfs the King is back👑
Thank you sir
i want to hit the mute button how do i use DOM to mute desktop audio???
0281 Alf Motorway
CHAD! Chanel 🍷🗿
msg means Uncle Roger , 😂😂 just kidding
zguba!
W
0:07 DOM is not a JS object, but it represent the page we see in the browser
DOM is a JS object _which_ represents the page we see in the browser.
fru
every time i code document.getelementbyId the console says document is not defined. how could i overcome this problem. im using node.js
document.getElementById()is displayed on the screen bro and not in the console.
For the console ,it is
Console.log() you have to define your element with console to view it in your console.