728x90
문자 코드를 기준으로 문자를 코드로 변환하는 것을 문자 인코딩(encoding)
코드를 문자로 변환하는 것을 문자 디코딩(decoding)
encodeURI() : 주소에서 사용하는 :, ;, /, =, ?, & 등을 제외하고 인코딩하는 함수
encodeURIComponent() : 모든 문자를 인코딩하는 함수
decodeURI() : encodeURI로 인코딩한 문자열을 디코딩하는 함수
decodeURIComponent() : encodeURIComponent()로 인코딩한 문자열을 디코딩하는 함수
URI
https://truecode-95.tistory.com?true=코딩
encodeURI
https://truecode-95.tistory.com?true=%EC%BD%94%EB%94%A9
decodeURI
https://truecode-95.tistory.com?true=코딩
encodeURIComponent
https%3A%2F%2Ftruecode-95.tistory.com%3Ftrue%3D%EC%BD%94%EB%94%A9
decodeURIComponent
https://truecode-95.tistory.com?true=코딩
ajax 사용 예시
$.ajax({
url : encodeURI(geoserver + '/wfs?service=wfs&..............,
type : "GET",
dataType : "xml",
async : false,
success : function(xml){
'js' 카테고리의 다른 글
| [jQuery] $.isNumeric() 숫자 확인 함수 (0) | 2022.04.29 |
|---|---|
| [JavaScript] 왼쪽 0 제거하는 두가지 방법 (0) | 2022.04.13 |
| [jQuery] 동적 append css 추가하기 (0) | 2022.03.17 |
| [jQuery] 간단한 tab 메뉴 사용하기 (0) | 2022.03.16 |
| [bxSlider] <a> 태그 링크 이동 오류 해결 방법 (1) | 2022.03.07 |