Contents

조회 수 7225 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
337 Develop [c++] namespace 사용 예 hooni 2003.04.23 8658
336 Develop [css] 화면 스크롤 제어 ㅋㅋ hooni 2003.04.23 8681
335 Develop [asp] 문자열 넘겨받기 (get,post) hooni 2013.04.23 8683
334 Develop 논문 실험용 고려대 툴바 ㅎㅎ secret hooni 2013.04.23 8686
333 Develop [asem] CMOS 패스워드 알아내기.. 소스.. file hooni 2003.04.23 8698
332 Develop [php] 초간단 게시판 페이지 분할 알고리즘 hooni 2003.04.23 8699
331 Develop [java] Interface 와 abstract hooni 2013.04.23 8707
330 Develop [js] Text 중 URL 형식을 인식해 단축 URL로 변경 file hooni 2013.04.23 8713
329 Develop [c] 캘린더 양음 변환 함수 hooni 2003.04.23 8722
328 Develop [c] OpenGL 마우스 이벤트 hooni 2003.04.23 8731
327 Develop [c++] 중복실행 방지(Mutex;뮤텍스 ) 샘플 소스.. ㅋㅋ file hooni 2013.04.23 8743
326 Develop [c] OpenGL 시어핀스키 가스킷(p.73 - 첫시간) hooni 2003.04.23 8758
Board Pagination Prev 1 ... 38 39 40 41 42 43 44 45 46 47 ... 71 Next
/ 71