Contents

조회 수 7223 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
441 Develop [node.js] nodejs 기본 설치 hooni 2013.04.23 26256
440 Develop [node.js] 지금 하고 있는거.. file hooni 2013.04.23 26979
439 Develop [iphone] 파일 업로드 샘플 코드 ㅎㅎ secret hooni 2013.04.23 11120
438 Develop [js] JSON 컨트롤.. 재귀호출로 값 출력하기 hooni 2013.04.23 28640
437 Develop [js] 모바일웹에서 이미지 저장하는거 (context menu) 막기 hooni 2013.04.23 26370
436 Develop [android] keytool을 사용하여 키스토어 생성 hooni 2013.04.23 69515
435 Develop [js]모바일 웹에서 orientationchange hooni 2013.04.23 19360
434 System/OS 맥에서 파일공유 (윈도우,맥) file hooni 2013.04.25 37305
433 System/OS [mysql] mysql user 생성시 ERROR 1364 hooni 2013.04.25 28507
432 System/OS Mac OS X - Apache+PHP+MySQL 환경 서버 hooni 2013.04.25 31629
431 Etc 영어공부에 도움될만한 사이트 모음 hooni 2013.05.14 22632
430 Develop 서기의 PHP 동영상 강의(싱싱해) hooni 2013.05.15 30982
Board Pagination Prev 1 ... 57 58 59 60 61 62 63 64 65 66 ... 98 Next
/ 98