The JavaScript DOM explained in 5 minutes! 🌳
Вставка
- Опубліковано 4 гру 2023
- #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.
so clear and explanatory!! thank you for this video!!
I learnt html and css easily by your videos ❤ now I'm trying to learn js 🙏
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❤
Thank you so so so much
This is soo clear explanation broooo! Thank you!!!!
Cheers for this tutorial.
that is such a good explanation
bro fr knows the bro code
please keep doing what you're doing bro🙏🏻
Awesome video😎😎👍👍
Great video !
Best explanation...ever.
All I can say is _Understandable and have a good day_
Nice tutorial
Thank you
Thank you sir
CHAD! Chanel 🍷🗿
Surprise Surprise mfs the King is back👑
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.