[jQuery] match() 함수(특정 문자 포함 여부)
- 📕 Programing/jQuery
- 2023. 2. 9. 12:32
💻 MDN Web DOC
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match
String.prototype.match() - JavaScript | MDN
The match() method retrieves the result of matching a string against a regular expression.
developer.mozilla.org
💻 특정 문자 포함여부 체크
var telValue = $('#tel').val();
if ( telValue.match("-")) {
alert('-을 제거해주세요.');
return false;
}
'📕 Programing > jQuery' 카테고리의 다른 글
마우스 로딩표시 (0) | 2023.12.26 |
---|---|
[jQuery] checkbox에 체크된 값들만 가져오기 / 전체 선택|해제 (0) | 2023.02.03 |
[jQuery Plugin ] magnify - 이미지 확대 | 축소 등 (0) | 2021.10.18 |
[jQuery] 해당 요소의 상위요소 탐색 (0) | 2021.10.13 |
[jQuery] 테이블의 선택한 열 값 가져오는 방법 (0) | 2021.08.24 |