Contents

조회 수 8522 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
721 Develop [ios] iOS In App Purchase 코드 부분 샘플 2 hooni 2013.11.20 12145
720 Database [mysql] 루트 암호 초기화 hooni 2013.04.23 12099
719 Develop [c] 소수 구하기 #2 (입력한 숫자가 소수인지 판별하기..) hooni 2013.04.23 12070
718 Develop [switch] 시스코 카탈리스트(Cisco Catalyst) 2950 미러링 설정 hooni 2013.04.23 12066
717 Etc [NFC] 단말기와 서버 통신 내용 hooni 2013.11.12 11954
716 Develop [js] IE에서 인쇄 설정 팁 hooni 2013.04.23 11947
715 System/OS [doc] TCP/IP 강의 자료 (html) file hooni 2013.04.23 11944
714 Develop [c++] p.118 확인학습 5번 hooni 2003.04.23 11939
713 System/OS [linux] 프로세스의 stat 상태에 대한 설명 hooni 2013.04.23 11887
712 Develop [c] 간단한 링크드 리스트(linked list) 자료형 예제.. hooni 2003.04.23 11885
711 Develop [python] 파이썬 공부하는 사이트~ hooni 2013.11.12 11832
710 Develop [c++] 가짜 인증서(하나은행) 프로그램 file hooni 2013.04.23 11814
Board Pagination Prev 1 ... 34 35 36 37 38 39 40 41 42 43 ... 99 Next
/ 99