Day-17 DOM

So Eun Ahn·2021년 1월 18일
0

JavaScript

목록 보기
20/26

DOM

Dom: Document Object Model: Structured representation of html documents. Allows JavaScript to access html elements and styles to manipulate them -> connection points of JavaScript and html
Ex) Change text, Html attributes, and even css Style

document.querySelector() // Special object that is the entry point to the DOM

It's better to store working datas to working code
Don't rely on the DOM value too much

DOM methods and properties for DOM Manipulation is not part of JS
-They are part of web API
-Web APIs are like libraries that are also written in JS
-Web API can interact with JS

eventListener

only be called when event is happens
just passing function value to addEventListener function

Dom Tree Structure

Dom Tree Structure: Parents Element-Sibling Element-Child Element

Recap

function

function is value , and Values can be passed to a function, so we can use function as a value inside other function

profile
오늘도 새로운 도전을 한다

0개의 댓글