Develop
2013.04.23 16:11
[js] 네이버에서 그림 퍼올 때.. URL Encoding 관련ㅋㅋ
조회 수 7225 댓글 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>
-
[mysql] mysql user 생성시 ERROR 1364
-
맥에서 파일공유 (윈도우,맥)
-
[js]모바일 웹에서 orientationchange
-
[android] keytool을 사용하여 키스토어 생성
-
[js] 모바일웹에서 이미지 저장하는거 (context menu) 막기
-
[js] JSON 컨트롤.. 재귀호출로 값 출력하기
-
[iphone] 파일 업로드 샘플 코드 ㅎㅎ
-
[node.js] 지금 하고 있는거..
-
[node.js] nodejs 기본 설치
-
[iphone] 화면 전환 Portrait & Landscape Mode
-
[iphone] performSelector:withObject:afterDelay: 에 대한 내용
-
[ios] 디렉토리 하하하..