Develop
2013.04.23 16:11
[js] 네이버에서 그림 퍼올 때.. URL Encoding 관련ㅋㅋ
조회 수 8521 댓글 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>
-
[js] 사라지는 브라우저
-
[html] 메타태그 사용예.. 은지나 바라~
-
[c][java] 소켓 프로그래밍(채팅 서버 C, 클라이언트 Java)
-
[js] 자바스크립트와 정규표현식 메뉴얼 (chm 형식)
-
[c] kmp 활용 search
-
[php] 무조건 다운로드 받도록 header 세팅
-
[c] 시간(요일,날짜 포함) 출력하는 프로그램 초간단 코드
-
[asp] 폼 메일 소스
-
[c] 단기과정[01/06] sizeof, 실수표현, 메모리, 연산자
-
[php] gd 프로그램.. htm 파일.. ㅋㅋ
-
[c] 단기과정[01/10] 과제.. swap(any data, ..)
-
[c] 가변인자 함수(printf와 같은..)