Develop
2013.04.23 16:11
[js] 네이버에서 그림 퍼올 때.. URL Encoding 관련ㅋㅋ
Views 8522 Comment 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>
-
[c++] 트리컨트롤 예제1 ㅋㅋ
-
[js] 윈도우 시작버튼처럼 나오는 메뉴
-
[js] 스타크래프트(starcraft)..
-
[js] 양원님이 공유해 주신 유료(5$란다ㅋ) 자료 ㅋㅋ
-
[c++] template 사용예
-
[c++] mfc로 만든 인테리어 수납 시스템(2D기반 설계)
-
[web] 웹 연동 프로그램 모음..
-
라이브러리에 대한 설명 (static & dynamic library)
-
[c++] 템플릿(Template) 예제 소스..
-
[js] 숫자만 입력하게 하는 자바스크립트
-
[php] 논문 관리 프로그램.. ㅋㅋ
-
[c] 프로세스간의 통신(파이프)