๋ฐ์ํ ๐ JavaScript29 [JavaScript] DOM์ด๋ ๋ฌด์์ธ๊ฐ? ์นํ์ด์ง html, css : ๋ณด์ฌ์ง๋ ๊ฒ javascript: ๋ณด์ฌ์ง๋๊ฒ ์ปจํธ๋กค ํ๊ธฐ ์ํจ html child1 child2 child3 javascript const child1 ={ nonType:1, nodeName: 'div' childNode=[], arrtibutes:[] } const parent = docuemnt.querySelector('parend') parent.firstchild // #text parent.childNodes // [div] prenth.firstElementHild; // child1 html์ javascript ์๊ฒ ๊ทธ์ ๋ฌธ์์ผ ๋ฟ! -> โ DOM ( Document Object Model ) html์ javascript ๊ฐ ์ดํดํ ์ ์๋ object.. 2021. 2. 16. ์๋ฐ์คํฌ๋ฆฝํธ, ํจ์ํ ํ๋ก๊ทธ๋๋ฐ ํ๋ก๊ทธ๋๋ฐ ํจ๋ฌ๋ค์์ ๋ํด ์๊ฒ๋์๊ณ , ๊ทธ์ค ํจ์ํ ํ๋ก๊ทธ๋๋ฐ์ ์๋ฏธ,์กฐ๊ฑด,๊ทธ ์์์ ๋ํด ๊ณต๋ถํด๋ณด์๋ค. *ํ๋ก๊ทธ๋๋ฐ ํจ๋ฌ๋ค์: ํ๋ก๊ทธ๋๋ฐ์ ์ด๋ป๊ฒ ์ดํดํ๊ณ ๊ตฌ์ํ ์ง ์๊ฐํ๋ ๊ด์ ๐ํจ์ํ ํ๋ก๊ทธ๋๋ฐ โซ๏ธ ํจ์ ๋ฆฌํฐ๋ด ํจ๊ตฌ๋ ๊ฐ์ฒด์ฒ๋ผ ๋ณ์๋ ํจ์์ ์ธ์์ฒ๋ผ ๋ค๋ฃฐ ์ ์์ sdie effect ๊ฐ ์ ์ โซ๏ธ ํจ์ํ ํ๋ก๊ทธ๋๋ฐ ์ธ๋ถ์ ์ํฅ์ ๋ฐ์ง ์๋ ํจ์๋ก ๊ตฌํํ๋ ํ๋ก๊ทธ๋จ ๊ธฐ๋ฒ ๋ชจ๋ ๊ฑธ ํจ์๋ก ์คํ ํจ์ : input & output์ผ๋ก ์ด๋ฃจ์ด์ง -> ๋ช ๋ นํ ์์ํจ์๋ง ์ฌ์ฉ ์์ํจ์ : ์ฃผ์ด์ง input๋ง์ ์ฌ์ฉํด output ์์ฑ -> ํจ์ ์ธ๋ถ(ex ์ ์ญ๋ณ์)์ ๊ฒ ์ฌ์ฉ X ๋ถ์์ฉ(side effect) : ํจ์ฃผ๊ฐ ์ฃผ์ด์ง input์์ ๊ณ์ฐํ์ง ์์ output์ ๋ด๋ณด๋ด๋ ๊ฒ ์๋ฒ๋ก๋ถํฐ ๋ฐ์ Data๋ฅผ.. 2021. 2. 8. ์ด์ 1 2 3 4 ๋ค์ ๋ฐ์ํ