Contents

Views 7214 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
597 Develop [php] gd 프로그램.. htm 파일.. ㅋㅋ file hooni 2013.04.23 7412
596 Develop [c] 시간(요일,날짜 포함) 출력하는 프로그램 초간단 코드 hooni 2013.04.23 7392
595 Develop [c#] 툴바 최근 버전(IE6, IE7 두가지 버전) secret hooni 2013.04.23 2138
594 Develop [c#] 툴바 현재 욜심히 만들고 있는거.. 백업용.. ㅋㅋ secret hooni 2013.04.23 2852
593 Develop [c++] 중복실행 방지(Mutex;뮤텍스 ) 샘플 소스.. ㅋㅋ file hooni 2013.04.23 8737
592 Develop [c#] HTML 이벤트 샘플 소스.. file hooni 2013.04.23 7735
591 Develop [c++] 압축프로그램(Lite Zip) 샘플 file hooni 2013.04.23 8603
590 Develop [c++] 데이터 압축 프로그램 소스 (lzw) file hooni 2013.04.23 9935
589 Develop [c++] MFC로 만든 디렉토리/파일 파인더 file hooni 2013.04.23 9323
588 Develop [c] 아파치 모듈(Apache Module) 만들기 hooni 2013.04.23 8598
587 Develop [c++] 현승이가 준 메신저 소스.. ㅋㅋ file hooni 2013.04.23 8266
586 Develop [linux] 날짜나 파일의 내용으로 검색하는 방법(find 명령 사용) hooni 2013.04.23 8112
Board Pagination Prev 1 ... 44 45 46 47 48 49 50 51 52 53 ... 98 Next
/ 98