The DOM: What's the Document Object Model?

preview_player
Показать описание
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:

You can also use libraries like jQuery to simplify, standardize and automate manipulating the DOM, like:
$('#box2').append("This will be added to box2!")
Рекомендации по теме
Комментарии
Автор

I'm a starting.. student web developer, I googled "what is DOM" and read and read tutorials.. and just didint get that very simple consept, and you basically brought me out the darkness and said it in 15 seconds, i had a big moment, thanks!!! :)

urmask
Автор

The best description of what the DOM is that I have heard.

namronmanelok
Автор

This clearly clarifies what I have been struggling to understand for ages. Thank you so much.

jacquitratongamanahaja
Автор

I thought hashtags( # ) select the ID and dots( . ) select the class.

chrisprass
Автор

Thanks! I thought that DOM was a completely different thing complex to understand, BOOM there it is!

LesterShipMirOleg
Автор

you switched #(id) with .(class)
but still a valid jquery example.

warkentien
Автор

This is some great stuff!
Just a quick point.
The 'hash' gives reference to an ID, not a class.
Small oversight I'm sure, keep up the great work!

simoncess
Автор

Thank you that cleared up a lot of confusions I had about the dom

tazzadk
Автор

Pure vanilla JS, this was a dope one lol

rupakacharya
Автор

let me try is I understood, DOM is a little program built-in browsers to construct a tree model of my HTML and let me modify each element by javascript? i'm not native english so i'm trying to understand and sorry for my english

reinidvalarino
Автор

So basically when I click on inspect element on a website and I start modifying the code that pops up . That’s the Dom’s code I’m experimenting with?

Codeinemadethis
Автор

Thank you. Just a note. The sun light from your left is very distracting.

mustafaadam
Автор

She seems like she had a lot of fun with the hashtag by her reaction at 1:50.

DatMan
Автор

Do you know something about angular js ?

TejpalNakul
Автор

DOM = tree structure + API <---- ?

juju
Автор

Hmmm, yeah thats cute! I mean good info. Thanks.

syedali
Автор

I thought jquery is an api and JavaScript is the language. You said jquery is a language. Just want to clarify.

JavierCarrion
Автор

I couldn't get anything but i watched for u.

Akshay-Malthane
Автор

i can't pay attention. She is cute.

vinaciotm
Автор

I thought porn is forbidden on youtube)))) nice) very nice)

ivansavchenco