728x90 문자열자르기1 jquery - split 문자열 자르기 예제 var test = "2021/06/08"; test = test.split("/"); // 문자열 '/'기준으로 자른다. console.log(test[0]); // 결과 : 2021 console.log(test[1]); // 결과 : 06 console.log(test[2]); // 결과 : 08 var test = "제,이,쿼,리"; test = test.split(","); // 문자열 ','기준으로 자릅니다. console.log(test[0]); // 결과 : 제 console.log(test[1]); // 결과 : 이 console.log(test[2]); // 결과 : 쿼 console.log(test[3]); // 결과 : 리 2021. 6. 8. 이전 1 다음 반응형