Contents

조회 수 7218 댓글 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] 로또(Lotto) 번호 생성기

    Date2013.04.23 CategoryDevelop Byhooni Views7174
    Read More
  2. [c] 가변인자 함수(printf와 같은..)

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

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

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

    Date2003.04.23 CategoryDevelop Byhooni Views7188
    Read More
  6. [c] 함수 목록과 예제 소스 파일

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

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

    Date2013.04.23 CategoryDevelop Byhooni Views7198
    Read More
  9. [php] 웹 터미널 & 업로드 소스..

    Date2013.04.23 CategoryDevelop Byhooni Views7218
    Read More
  10. [js] 네이버에서 그림 퍼올 때.. URL Encoding 관련ㅋㅋ

    Date2013.04.23 CategoryDevelop Byhooni Views7218
    Read More
  11. [c] 단기과정[01/08] 배열, 포인터

    Date2003.04.23 CategoryDevelop Byhooni Views7223
    Read More
  12. [c] 단기과정[01/17] 후위연산 스택 계산기..

    Date2003.04.23 CategoryDevelop Byhooni Views7226
    Read More
Board Pagination Prev 1 ... 32 33 34 35 36 37 38 39 40 41 ... 98 Next
/ 98