Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- vetor
- plot in r
- 탈출문자
- R데이터형태
- 백준 11718
- React
- R 그래프
- 백준 10172
- DataFrame
- 10172
- 그대로 출력하기
- 버스분석
- 그래픽
- barplot in r
- asynchronization
- 값추가
- 배열추가
- useState
- setstate
- barplot
- react #회원가입 #비밀번호비교
- getline
- 백준
- await
- 이용현황분석
- 배열삭제
- 광명시버스분석
- 값삭제
- 데이터분석
- 이스케이프시퀀스
Archives
- Today
- Total
devlog_zz
encodeURI() , encodeURIComponent() 본문
728x90
URL로 사용할 수 없는 문자(한글, 특수문자, 예약어 )들을 사용할 수 있도록 인코딩 해주는 것
API 호출 시 URL로 사용할 수 없는 문자가 포함된다면encodeURI() / encodeURIComponent()
이와 같이 호출 해야함
encodeURI()
url 전체 인코딩 할 때
encodeURI("http://www.tistory.com/a t e s t.html")
encodeURI("http://www.tistory.com/a t e s t.html")
결과
http://www.tistory.com/a%20t%20e%20s%20t.html
encodeURIComponent()
url 매개변수의 값을 인코딩 할 때
var p1 = encodeURIComponent("a test.html")
var url = "http://www.tistory.com/"+p1+"¶m2=11";
결과
http://www.tistory.com/a%20test.html¶m2=11
728x90
'기록' 카테고리의 다른 글
[GIT] git diff - 브랜치 별 파일 내용 비교 후 변경된 부분 적용하기 (0) | 2022.09.13 |
---|---|
IE promise 오류 (0) | 2022.05.10 |
한글 byte, 영어 byte (0) | 2022.01.31 |
크롬 디버거 (0) | 2020.12.04 |
Comments