Contents

Views 7216 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

이렇게 인코딩 해야 됨 ㅋㅋ

<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
No. Category Subject Author Date Views
717 Develop [git] 쉬운 버전관리 Git 설명 hooni 2015.08.18 872
716 Develop [html] HTML5 튜토리얼 링크 ㅋㅋ hooni 2013.04.23 12813
715 Develop [html] SVG(Scalable Vector Graphics) 간단 정리 hooni 2014.02.13 8831
714 Develop [html] 메타태그 사용예.. 은지나 바라~ hooni 2003.04.23 7227
713 Develop [html] 캐쉬된 웹페이지 사용하지 않도록 하는 방법 hooni 2003.04.23 13028
712 Etc [htm] DOM에 대해 ㅎㅎ file hooni 2003.04.23 14717
711 Develop [ios] UIView 계층구조 hooni 2015.01.03 1124
710 Develop [ios] @property의 속성 (strong, weak, copy) 사용 경우 hooni 2014.08.08 1656
709 Develop [ios] AES256 알고리즘을 이용해 데이터 암호화/복호화 방법 file hooni 2015.07.21 4101
708 Develop [ios] APNS 샘플 코드.. secret hooni 2013.06.27 0
707 Develop [ios] APNS 클라이언트 구현 (pdf) file hooni 2013.06.27 15689
706 Develop [ios] APNS, Remote Push 사용자가 수신을 동의했는지 확인하기 hooni 2018.10.19 1250
Board Pagination Prev 1 ... 34 35 36 37 38 39 40 41 42 43 ... 98 Next
/ 98