Contents

조회 수 7225 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
585 Develop [js] 쿠키(cookie)에 대한 설명과 예제.. hooni 2003.04.23 8321
584 Develop [c++] 레지스트리 편집하는 부분..ㅡㅡ; file hooni 2013.04.23 8278
583 Develop [c++] 현승이가 준 메신저 소스.. ㅋㅋ file hooni 2013.04.23 8277
582 Develop [c] 이진트리(binary tree)의 운행.. hooni 2003.04.23 8270
581 Develop [c] selec()를 이용한 입출력 다중화 file hooni 2013.04.23 8259
580 Develop [php] 마시마로 캐릭터 방명록 file hooni 2003.04.23 8239
579 Develop [c] 문자열 정렬 함수 qsort() hooni 2003.04.23 8232
578 Develop [c] 그래픽 차트 라이브러리.. 나중에 확인 해볼 거.. file hooni 2013.04.23 8225
577 Develop [unix] Java 애플릿용 HTML 자동 생성 hooni 2014.02.19 8219
576 Develop [c] 스토리지 클래스(변수) hooni 2003.04.23 8198
575 Develop [vb] 64bit RSA 프로그램 소스 ㅋㅋ file hooni 2013.04.23 8193
574 Develop [c] 가위 바위 보 서버, 클라이언트 소스코드 file hooni 2003.04.23 8180
Board Pagination Prev 1 ... 45 46 47 48 49 50 51 52 53 54 ... 98 Next
/ 98