Develop
2013.04.23 16:11
[js] 네이버에서 그림 퍼올 때.. URL Encoding 관련ㅋㅋ
조회 수 7226 댓글 0
이렇게 인코딩 해야 됨 ㅋㅋ
<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>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
825 | System/OS | [linux] 리눅스 활용 팁^^ | hooni | 2003.04.23 | 14631 |
824 | System/OS | [linux] 리눅스 파일시스템과 디렉토리 설명 | hooni | 2013.04.23 | 26880 |
823 | System/OS | [linux] 랜카드가 2개 일 때 네트워크 설정 | hooni | 2003.04.23 | 30039 |
822 | System/OS | [linux] 랜카드 2개 설정 & iptables 로 사설 ip.. | hooni | 2003.04.23 | 14743 |
821 | System/OS | [linux] 데스크탑환경(GNOME/KDE) 바꾸기.. | hooni | 2003.04.23 | 12106 |
820 | System/OS | [linux] 데비안(debian.org) 리눅스 명령어 예제 | hooni | 2006.04.23 | 10427 |
819 | System/OS | [linux] 네트웍 트래픽 모니터링(MRTG) | hooni | 2003.04.23 | 41932 |
818 | System/OS | [linux] 네트워크 커널 설정.. | hooni | 2003.04.23 | 16483 |
817 | Develop | [linux] 날짜나 파일의 내용으로 검색하는 방법(find 명령 사용) | hooni | 2013.04.23 | 8124 |
816 | System/OS | [linux] 꿀통(honeyd) 설치하기.. 메뉴얼 과정 6 | hooni | 2006.04.23 | 20225 |
815 | System/OS | [linux] 기존 환경설정 저장하면서 커널 컴파일.. | hooni | 2003.04.23 | 13470 |
814 | System/OS | [linux] 기본적인 설정하기(내공쌓기) | hooni | 2003.04.23 | 13995 |