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>


?

  1. [c] 단기과정[01/08] 배열, 포인터

    Date2003.04.23 CategoryDevelop Byhooni Views7223
    Read More
  2. [c] 네트워크 관련 프로그래밍 (포트스캔 탐지 샘플)

    Date2013.04.23 CategoryDevelop Byhooni Views7199
    Read More
  3. [c] 함수 목록과 예제 소스 파일

    Date2013.04.23 CategoryDevelop Byhooni Views7194
    Read More
  4. [c] 시스템 보안 과제.. 시간(amc time) 변경

    Date2013.04.23 CategoryDevelop Byhooni Views7194
    Read More
  5. [c] 문자열 라이브러리 최신버전

    Date2003.04.23 CategoryDevelop Byhooni Views7188
    Read More
  6. [c] 연산자 우선순위.. ㅋㅋ

    Date2013.04.23 CategoryDevelop Byhooni Views7185
    Read More
  7. [c] 시스템공학 레포트 (pass1, pass2)

    Date2003.04.23 CategoryDevelop Byhooni Views7183
    Read More
  8. [c] 가변인자 함수(printf와 같은..)

    Date2013.04.23 CategoryDevelop Byhooni Views7179
    Read More
  9. [c++] 트리컨트롤 예제1 ㅋㅋ

    Date2013.04.23 CategoryDevelop Byhooni Views7175
    Read More
  10. [c] 로또(Lotto) 번호 생성기

    Date2013.04.23 CategoryDevelop Byhooni Views7174
    Read More
  11. [js] 후리자(영규) 스타일들..

    Date2013.04.23 CategoryDevelop Byhooni Views7156
    Read More
  12. [java] 컴포넌트 배치 ㅡ.,ㅡ;

    Date2003.04.23 CategoryDevelop Byhooni Views7156
    Read More
Board Pagination Prev 1 ... 57 58 59 60 61 62 63 64 65 66 ... 98 Next
/ 98