Contents

조회 수 7237 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
433 Develop [c] UCP/TCP 채팅 소스 - 정리해야 함.. file hooni 2003.04.23 7939
432 Develop [js] 자바스크립트 이벤트 핸들.. hooni 2003.04.23 7938
431 Develop [java] 마우스 버튼 테스트.. swing.. file hooni 2013.04.23 7903
430 Develop [c] OpenGL 색 입방체의 회전(입체) hooni 2003.04.23 7890
429 Develop [linux] 프로세스 관련 시스템콜 hooni 2003.04.23 7865
428 Develop [c] 소수 구하기 #1 (한정된 숫자 내에 있는 소수 걸러내기) hooni 2003.04.23 7865
427 Develop [java] RGB 색상 조절 버튼.. 스윙(swing) file hooni 2013.04.23 7861
426 Develop [c] i2osp 임시로.. ㅋㅋ file hooni 2003.04.23 7854
425 Develop [c] fgets() 함수 사용하기.. hooni 2003.04.23 7853
424 Develop [mysql] 양력, 음력 DB데이터 file hooni 2013.04.23 7838
423 Develop [jsp] HelloServlet 출력문 file hooni 2003.04.23 7832
422 Develop [c] 이진트리(binary tree) 샘플소스 (삽입, 삭제, 운행) file hooni 2003.04.23 7831
Board Pagination Prev 1 ... 30 31 32 33 34 35 36 37 38 39 ... 71 Next
/ 71