Contents

Views 7253 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
433 Develop [ios] Background 에서 네트워크 사용 file hooni 2013.07.22 11600
432 Develop [ios] binary를 C코드로 변환 file hooni 2015.01.03 1654
431 Develop [ios] CoreData 사용하기 (튜토리얼) hooni 2014.03.28 3241
430 Develop [ios] Crashlytics, Fabfic 설치/설정 hooni 2016.07.21 851
429 Develop [ios] DatePicker iOS 6.x 이하 디자인. file hooni 2014.04.10 4132
428 Develop [ios] Debug Extensions (from 종길 차장님 ㅋㅋ) file hooni 2013.04.23 17733
427 Develop [ios] Did UIScrollView End Scrolling? hooni 2016.04.19 1181
426 Develop [ios] DJBros. (DJ요맨~) file hooni 2013.04.23 28140
425 Develop [ios] Facebook Cache 갱신하는 함수 file hooni 2017.02.27 1332
424 Develop [ios] Facebook SDK 로그인 설명 file hooni 2017.04.19 1368
423 Develop [ios] FlckrFeed Example App (Swift) file hooni 2016.11.27 1215
422 Develop [ios] GCD 변수 사용 예제 hooni 2013.10.01 12158
Board Pagination Prev 1 ... 30 31 32 33 34 35 36 37 38 39 ... 71 Next
/ 71