![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fxy2re%2FbtsohoJWFO4%2FDq022UmEMSCcBVRIOe5Fy1%2Fimg.jpg)
JavaScript
[JavaScript] document
document .querySelector 클릭 function myFunc(){ var boxList=document.querySelectorAll("#wrap>#box") //#wrap하위의 #box모두 접근 boxList[0].innerText="변경111" boxList[1].innerText="변경222" } function myFunc2(){ var boxList=document.querySelectorAll("#wrap>#box") //#wrap하위의 #box모두 접근 alert(boxList[0].innerText) alert(boxList[1].innerText) } wrap 하위 box로 접근도 가능하고, 배열 안에 넣어서도 사용가능하다. .getElementById 클릭 ID에 의한 ..