- Auto Close Tag ํ๋ฌ๊ทธ์ธ ๋ค์ด๋ก๋
- ๊ธฐ๋ณธ HTML ํ๊ทธ ์ ํ
ํ๊ทธ ๋น ํ๋ฉด์ธ ๊ฒฝ์ฐ ๋ฐ๋ก Tab + !
๋ฐ์ดํฐ๊ฐ ์๋ ๊ฒฝ์ฐ ctrl + a (์ ์ฒด์ ํ)ํ๊ณ Tab + !
- ์๋์์ฑ div#app ๊ธฐ๋ฅ : <divid="app"></div>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="app">
<!--hello world-->
</div>
<script>
//์ ์ด์ฟผ๋ฆฌ $('#app') ์ ๊ฐ๋ค
//div ํ๊ทธ์ ์ ๋ณด๋ฅผ ๊ฐ์ ธ์์ div๋ผ๋ ๋ณ์์ ๋ด์ ์ ์๋ค.
var div = document.querySelector('#app');
var str = 'hello world';
console.log(div); //<div id="app"></div>
div.innerHTML = str;
str = 'hello world ๋ณ๊ฒฝํฉ๋๋ค'; //์ด๋ ๊ฒ๋ง ๋ณ๊ฒฝํ๋ฉด, ๋ฐ๋ ๋ฐ์ดํฐ์ ๋ด์ฉ์ด ๋ฐ์๋์ง ์๋๋ค.
div.innerHTML = str; //๋ ๋ค์ ๋์
์ ํด์ฃผ์ด์ผ๋ง ๋ณ๊ฒฝ ๋ด์ฉ์ด ๋ฐ์๋์ด์ง. ์ผ๋ฐ์ ์น ๊ฐ๋ฐ ๋ฐฉ์!
</script>
<!--
HTML์ ํ๋ฉด์ ๋ํ๋๋ ํ๊ทธ, DOM์ ์ ๋ณด๋ฅผ ๋ฃ๋ ๊ฒ
์๋ฐ์คํฌ๋ฆฝํธ๋ ํด๋น ํ๊ทธ๋ DOM์ ์กฐ์ํ๋ ๊ฒ
-->
</body>
</html>
์ฐธ๊ณ !
1. VS code ํ ์ค ์ญ์ ๋จ์ถํค๋ ctrl + shift + k
2. open Live Serve : ๋ณ๊ฒฝ์ฌํญ์ด ์๋ก๊ณ ์นจ ์์ด ๋ฐ๋ก ์ ์ฉ ๊ฐ๋ฅํ๊ฒ ํด์ฃผ๋ ํ๋ฌ๊ทธ์ธ
'๐ Language > Vue' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Age of Vue] Vue.js ์์ํ๊ธฐ - 6. Reactivity ์ฝ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌํ ํ๊ธฐ (0) | 2022.04.27 |
---|---|
[Age of Vue] Vue.js ์์ํ๊ธฐ - 5. Reactivity ๊ตฌํ (0) | 2022.04.27 |
[Vue] Vue์ ๋ํ์ฌ (๋น๊ณต๊ฐ) (0) | 2022.04.27 |
[HTML] HTML ๊ธฐ๋ณธ ํ๊ทธ ์ ๋ฆฌ (๋น๊ณต๊ฐ) (0) | 2022.04.27 |
[Age of Vue] Vue.js ์์ํ๊ธฐ - 3. MVVM ๋ชจ๋ธ์์์ Vue (0) | 2022.04.26 |