Contents

Views 7225 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

이렇게 인코딩 해야 됨 ㅋㅋ

<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
No. Category Subject Author Date Views
717 Develop [c] 신기한 atoi함수(www.game79.net) hooni 2003.04.23 7274
716 Develop [js] 초간단 현재 사이트 쿠키 확인하는 명령~ hooni 2003.04.23 7276
715 Develop [pdf] C++ 국제 표준 문서 file hooni 2013.04.23 7281
714 Develop [c++] mfc로 만든 사용자 계정 리스트 출력(EnumUser) 프로그램 예제 file hooni 2013.04.23 7292
713 Develop [c]디렉토리 탐색 file hooni 2003.04.23 7305
712 Develop [jsp] 정적/동적(차트생성) 이미지 전달 file hooni 2003.04.23 7307
711 Develop 객체지향 프로그래밍에 대한 개념.. (객체) file hooni 2013.04.23 7314
710 Develop [php] 이미지 회전시키기(gd) hooni 2013.04.23 7318
709 Develop [c] 플러드 필링 (flood filling) 알고리즘.. file hooni 2013.04.23 7320
708 Develop [c/c++] Makefile 사용하기.. ㅋㅋ hooni 2003.04.23 7323
707 Develop [c] 스택/힙 오버플로우 테스트(overflow) file hooni 2003.04.23 7327
706 Develop [asp] 폼 메일 소스 file hooni 2013.04.23 7354
Board Pagination Prev 1 ... 34 35 36 37 38 39 40 41 42 43 ... 98 Next
/ 98