
.html페이지에 모든것을 담지않고, .css .js 파일로 각각 처리를 한 후에 이런식으로 넣어주면 한페이지에 다 때려박지 않아 정돈이 잘 된 코드들을 볼 수 있다. id를 선언할때는 #, class를 선언할때는 . 으로 시작된다. document.getElementById(" ") 는 id에 의해 구분되는 element를 가져와서 그것의 값을 가져와라 라는 함수이다. hello>/h2> const title = document.getElementById("title"); console.log(title) console.error(whatthe) title.innerHTML = "Hi! from JS" h1에 hello라고 적어놔서 출력이 hello라고 되야하지만, innerHTML을 사용해서 Hi! ..
© 2018 webstoryboy