Contents

조회 수 8521 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

이렇게 인코딩 해야 됨 ㅋㅋ

<html>

<head>

<script type="text/javascript">
function encode(){
  s = document.f.str.value;
  r = encodeURIComponent(s);
  document.f.res.value = r;
}

function decode(){
  s = document.f.str.value;
  r = decodeURIComponent(s);
  document.f.res.value = r;
}
/*
  var s;

  s = encodeURI('http://www.google.co.kr/소 설.html');
  document.write('<p>' + s + '<p>');
  // 출력 결과: http://www.google.co.kr/%EC%86%8C%20%EC%84%A4.html

  s = encodeURIComponent('http://www.google.co.kr/소 설.html');
  document.write('<p>' + s + '<p>');
  // 출력 결과: http%3A%2F%2Fwww.google.co.kr%2F%EC%86%8C%20%EC%84%A4.html


  s = escape('http://www.google.co.kr/소 설.html');
  document.write('<p>' + s + '<p>');
  // 출력 결과: http%3A//www.google.co.kr/%uC18C%20%uC124.html
*/

</script>

</head>

<body>


<form name=f>
<textarea name=str cols=70 rows=7></textarea>
<br>
<input type=button onClick=encode() value=Encode>
<input type=button onClick=decode() value=Decode>
<br>
<textarea name=res cols=70 rows=7></textarea>
</form>

</body>
</html>


?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
745 System/OS [linux] iptables 명령어 매뉴얼(options) hooni 2003.04.23 12620
744 System/OS php.ini 설정 안됐을때.. ㅋㅋ hooni 2013.04.23 12574
743 System/OS [unix] 유닉스 csh에서 환경변수 등록 hooni 2003.04.23 12570
742 Develop [c++] mfc 이용한 기본적인 형변환 예제 hooni 2013.04.23 12563
741 Develop [java] 초간단 싱글톤(Singleton) 패턴 샘플 코드 file hooni 2013.11.18 12544
740 Develop [c] scanf(), printf() 포맷의 형변환 hooni 2003.04.23 12519
739 Develop [c++] SetWindowPos함수를 이용한 크기조절 예제 1 file hooni 2013.04.23 12467
738 Develop [c++] mfc에서 윈도우 항상 위 속성 주기.. hooni 2013.04.23 12454
737 Develop [c++] mfc 조건별 파일 검색 프로그램 소스 ㅋㅋ 19 file hooni 2013.04.23 12419
736 Develop OpenGL 강좌 사이트 모음 hooni 2013.04.23 12412
735 Develop [spring] 스프링 IoC/DI hooni 2013.04.23 12384
734 Develop [ios] UIWebView 쿠키 유지 hooni 2014.01.16 12383
Board Pagination Prev 1 ... 32 33 34 35 36 37 38 39 40 41 ... 99 Next
/ 99