Develop
[javascript] jquery selector 선택자 like 로 찾기
issuemaker99
2024. 9. 10. 18:27
728x90
jqeury 로 셀렉터 선택자에 접근할 때 문자열 존재여부로 찾기
태그의 attr 속성값을 유동적으로 생성할 때 활용할 수 있다.
▶ input 의 name 이 'selector' 와 일치하는 요소
$("input[name='selector']")
▶ input 의 id 가 'selector' 로 시작하는 요소 (like 'selector%')
$("input[id^='selector']")
▶ input 의 name 에 'selector' 가 포함된 요소 (like '%selector%')
$("input[name*='selector']")
▶ input 의 id 가 'selector' 로 끝나는 요소 (like '%selector')
$("input[id$='selector']")
LIST