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
번호 분류 제목 글쓴이 날짜 조회 수
205 Develop [c++] 기초강좌 #04(클래스) hooni 2003.04.23 11859
204 Develop JSON, BSON 변환 file hooni 2013.04.23 11859
203 Develop [java] 날짜 계산 (Date, SimpleDateFormat) hooni 2013.04.23 11863
202 Develop [php] 한샘 전자발주 시스템.. file hooni 2013.04.23 12015
201 Develop [c++] 현승이가 준 P2P 프로그램 소스 ㅋㅋ file hooni 2013.04.23 12092
200 Develop [c++] 기초강좌 #03(함수의 매개변수 전달) hooni 2003.04.23 12127
199 Develop [ios] GCD 변수 사용 예제 hooni 2013.10.01 12146
198 Develop 참고하고 지울 자료.. 집에서 바야지.. ㅋㅋ file hooni 2013.04.23 12158
197 Develop [c] 문자열 자르는 함수(strtok) 예제 hooni 2013.04.23 12196
196 Develop SVN 명령어 (SVN command) hooni 2014.02.28 12196
195 Develop [php] 하루 전 날짜 쉽게 구하기. hooni 2013.12.25 12266
194 Develop [c++] 자료구조(링크리스트,스택,큐)와 후위 표기 계산기 샘플 ㅋㅋ 4 file hooni 2013.04.23 12340
Board Pagination Prev 1 ... 49 50 51 52 53 54 55 56 57 58 ... 71 Next
/ 71