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 3.X 소스 설치
- httpd-info.conf
- unique_id
- gcc update
- apache 연동
- httpd-default.conf
- PHP 5.2.17 .ini
- epel repository
- CentOS 6
- Mod_Security 룰 셋
- httpd 2.2.32
- node.js
- PHP 5.2 .ini
- MySQL
- httpd-mpm.conf
- mod_unique_id
- httpd-vhosts.conf
- vim color scheme
- vimrc 옵션
- CentOS 6.10
- Node.js apache 연동
- python 3.5.10
- Node.js 소스 설치
- CentOS
- httpd-autoindex.conf
- MySQL 5.1.41
- Repository
- httpd.conf
- httpd-dav.conf
- jQuery
Archives
- Today
- Total
곰시기's
JQuery - ajax 한글 깨짐 본문
Ajax는 기본적으로 UTF-8로 작동하는데 이 때 서버가 EUC-KR일경우 넘겨받는 데이터가 깨질 수 있다.
이럴 때 "contentType: 'application/x-www-form-urlencoded; charset=euc-kr'"을 추가 해주면 정상적으로 값을 받아올 수 있다.
$.ajax({
type: "post",
url : "",
data: frmData,
contentType: 'application/x-www-form-urlencoded; charset=euc-kr',
dataType:"json",
success : function( data ) {
console.log( data );
},
error: function( jqXHR, textStatus, errorThrown ) {
console.log( jqXHR.responseText );
}
});
contentType: 'application/x-www-form-urlencoded; charset=euc-kr', 를 추가
'Web Development > JavaScript' 카테고리의 다른 글
[vanilla] 형제 노드 추가 (0) | 2022.11.01 |
---|---|
[vanilla] closest (0) | 2022.11.01 |
JQuery - get 파라미터를 Object로 (0) | 2021.02.12 |
JQuery - unescapeHtml (0) | 2021.02.12 |
JQuery - 드래그 체크 박스 (0) | 2021.02.11 |
Comments