제이쿼리로 table td 또는 ul li 값 가져오기 How to get the text value of td or li(html) 간단히 this 를 사용해서 가져옵니다. 아이디를 직접 정의하기 보다는 클래스로 정의해서 사용합니다. // html 값1 값2 값3 값4 여기1 여기2 여기3 여기4 // script $(".test-td td").click(function(){ console.log($(this).text()); }); $(".test-li li span").click(function(){ console.log($(this).text()); });