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
- paint
- JSP
- 오버로딩
- 기본
- 클래스
- Android
- Spring
- OGNL
- 에러페이지
- 어노테이션
- mybatis
- oracle
- 생성자
- JavaScript
- AWT
- HTML
- layout
- 이클립스
- 전화걸기
- Java
- Menu
- Eclips
- Graphic
- 국제화
- 안드로이드
- 예외처리
- 메소드
- 메서드
- struts2
- 배열
Archives
- Today
- Total
note
인코딩 본문
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>인코딩</title> <script> //인코딩할 URL을 만듭니다. var URI = 'http://hanb.co.kr?test=한글입니다.'; //출력할 문자열을 만듭니다. var output = ''; output += '★escape( )\n' output += escape(URI) + '\n\n'; output += '★encodeURI()\n' output += encodeURI(URI) + '\n\n'; output += '★encodeURIComponent( )\n' output += encodeURIComponent(URI) + '\n\n'; //출력합니다. alert(output); </script> </head> <body> </body> </html>
주소 전체를 값으로 넘길 경우 encodeURIComponent를 사용하고
일반적으로 encodeURI도 사용된다
'JavaScript > 기본' 카테고리의 다른 글
| 숫자관련 내장함수 isFinite / isNaN (0) | 2012.03.12 |
|---|---|
| eval() 함수 (0) | 2012.03.12 |
| 클로저 (지역변수 확장) (0) | 2012.03.12 |
| 선언적 함수를 매개 변수로 전달 (0) | 2012.03.12 |
| 익명 함수를 매개 변수로 전달 (0) | 2012.03.12 |