반응형
250x250
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
- Python
- codedeploy error
- or some instances in your deployment group are experiencing problems.
- COALESCE
- JavaScript
- 도커
- Spring
- Flux
- IntelliJ
- docker
- java bigdecimal
- redis
- chart.js
- bootstrap
- aws
- Airflow
- aws cicd
- SQL
- chartjs
- kubeflow
- Jenkins
- Spring Error
- node
- codepipeline
- AWS CI/CD 구축하기
- VPN
- PostgreSQL
- codedeploy
- codebuild
- Kafka
Archives
- Today
- Total
Small Asteroid Blog
jquery string 으로 url 넘길 때 특수문자 사라지는 현상 해결(encodeURICpmponent) 본문
프론트엔드/Javascript
jquery string 으로 url 넘길 때 특수문자 사라지는 현상 해결(encodeURICpmponent)
작은소행성☄️ 2021. 4. 12. 19:37728x90
url 을 jquery로 전달하는데 %문자가 포함된 글자가 변겨오디어서 출력되는 현상을 발견했다.
'%3D ' 가 '=' 로 변경되어 출력됨
//+ 와 & 만 퍼센트 인코딩으로 변경
url = url.replace(/&/g, "%26").replace(/\+/g,"%2B");
//url 전체를 퍼센트 인코딩으로 변경
url = encodeURICpmponent(url);
728x90
반응형
'프론트엔드 > Javascript' 카테고리의 다른 글
jQuery를 사용하여 동적 테이블의 특정 행(tr,td)을 삭제하는 방법 (동적으로 행 삭제) (2) | 2021.04.14 |
---|---|
[url 인코딩/ 디코딩] encodeURI(), encodeURIComponent(), decodeURI(), decodeURIComponent() (0) | 2021.04.13 |
[javascript] table row text 가져오기 (table td text ,tr text 데이터) (0) | 2021.04.12 |
javascript json key, value 추출 (0) | 2021.04.09 |
ajax xml 전체내용 출력 (0) | 2021.04.07 |