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 |
Tags
- paint
- 어노테이션
- Android
- 이클립스
- oracle
- OGNL
- 클래스
- 에러페이지
- JavaScript
- 생성자
- 안드로이드
- Eclips
- 기본
- mybatis
- struts2
- Graphic
- 메소드
- layout
- AWT
- 예외처리
- Java
- Spring
- Menu
- 메서드
- JSP
- 전화걸기
- 국제화
- 배열
- 오버로딩
- HTML
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 |