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
번호 분류 제목 글쓴이 날짜 조회 수
717 Develop [php] XE 관리자 IP대역 설정 오류 해결법 hooni 2014.02.10 10778
716 System/OS [mysql] 시간 관련 SQL구문.. hooni 2013.04.23 10775
715 System/OS [linux] 프로세스의 stat 상태에 대한 설명 hooni 2013.04.23 10762
714 Develop [c++] 가짜 인증서(하나은행) 프로그램 file hooni 2013.04.23 10761
713 Develop [c++] p.118 확인학습 5번 hooni 2003.04.23 10734
712 Develop [c++]현승이가 보내준 암호화 모듈 AES라인델.. file hooni 2003.04.23 10715
711 Develop [js] jQuery plugin 요약 hooni 2013.12.20 10703
710 System/OS [perl] 영규가 만든 스크립트.. 하하.. hooni 2013.04.23 10597
709 Develop [php] GregorianToJD(), JDToGregorian() 함수 내용 hooni 2013.12.25 10596
708 Develop [php] 날짜 정보 출력 (년,월,일,시,분,초) hooni 2013.04.23 10521
707 System/OS [linux] SSH에 대한 기본 설명과 설치/설정 hooni 2013.04.23 10500
706 System/OS [doc] 레드햇 리눅스 메뉴얼 (html버전) file hooni 2013.04.23 10452
Board Pagination Prev 1 ... 34 35 36 37 38 39 40 41 42 43 ... 98 Next
/ 98