devWonny 2021. 11. 18. 19:24

https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_element_matches2

 

W3Schools online HTML editor

The W3Schools online code editor allows you to edit code and view the result in your browser

www.w3schools.com

if (element.matches(".container, .wrapper")) { 

 

wrapper 는 뭐지???

 

 

 

https://ko.javascript.info/searching-elements-dom

 

getElement*, querySelector*로 요소 검색하기

 

ko.javascript.info

for (let elem of document.body.children) { if (elem.matches('a[href$="zip"]')) { alert("주어진 CSS 선택자와 일치하는 요소: " + elem.href ); } }

 

제이쿼리는 iterable 하지 않은가?

 

그렇다면 querySelectorAll 하면 iterable 해지나?

let elements = document.querySelectorAll('ul > li:last-child'); for (let elem of elements) { alert(elem.innerHTML); // "1-2", "2-2" }

 

 

 

https://csy7792.tistory.com/17

불러오는 중입니다...

 

var innerText = document.getElementById(elementId).innerText;

td같은태그는 value로 못 가져와서 innerText로 가져와야한다!