티스토리 뷰

반응형

p.6

DOM

Document Object Model

트리형식으로 표현하는 것

content까지 노드가 된다

 

 

 

p.8

document, methods, property

document.getElementById("demo").innerHTML="Hello World";

 

document, methods, property

 

시작할때 document.으로 시작한다

중요

 

 

 

 

시험은 소스코드를 주고

결과화면이 어떻게나올지 적어보세요 라고 나온다

 

 

 

 

 

getElementByID -> return only one element

getElementByTagName -> return several elements

 

 

 

p.14

return an HTMLCollection object

 

HTMLCollection object is an array-like list(collection) of HTML elements

length사용가능

 

However HTMLCollection is not array

because you cannot use array methods like Valueof(), pop(), push()

 

 

 

 

 

p.15

querySelectorAll

css selector로 접근

id,name,class universal, attribute, pseudo-class ...

 

 

 

 

p.16

querySelectorAll() method returns a NodeList

NodeList object is an array-like list(collection) of HTML elements

 

 

 

 

HTMLCollection vs NodeList

비슷한데 차이가 있다

 

htmlcollection is a collection of documents elements

can be accessed by name,id,index number

 

nodelist is a collection of document nodes

can be accessed only by index number

 

 

 

 

p.18

innerHTML은 contents다

 

how to access body?
document.body

 

 

 

 

 

 

 

p.19

innerHTML

access contents of HTML element

 

 

 

p.22

document.getElementById(id).attribute=new value;

 

 

 

p.23

document.getElementById(id).value=new value;

 

 

 

 

p.33

document.createTextNode("Water");

 

 

 

p.39 시험에나오면안될거같아요

 

 

 

p.40

event name, content of event

 

반응형

'개념 > ' 카테고리의 다른 글

OAuth 개념  (0) 2023.01.04
Node.js  (0) 2022.05.27
javscript 함수 매개변수  (0) 2022.04.18
오픈소스웹소프트웨어 Basics of JavaScript  (0) 2022.04.15
오픈소스웹소프트웨어 CSS Box Model and Layout  (0) 2022.04.08
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함