const title = document.querySelector(".hello h1");

console.log(title);
 
// 위 함수를 이용해서 인덱스 파일에 요소를 불러올수있다.
 

 

클래스 헬로우의 h1 요소를 끌고 온 모습.

 

document.querySelectoALL  은 해당 클래스에 있는 모든 h1을 불러들인다.

 

 
 

 

+ Recent posts