Develop
2013.04.23 16:11
[js] 네이버에서 그림 퍼올 때.. URL Encoding 관련ㅋㅋ
조회 수 7237 댓글 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>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
517 | Develop |
[c] 이진 탐색 두 가지 코드 (재귀/반복)
![]() |
hooni | 2015.06.26 | 949 |
516 | Develop |
[c] 이진트리(binary tree) 샘플소스 (삽입, 삭제, 운행)
![]() |
hooni | 2003.04.23 | 7831 |
515 | Develop | [c] 이진트리(binary tree)의 운행.. | hooni | 2003.04.23 | 8289 |
514 | Develop |
[c] 이진트리(binary tree)의 특성
![]() |
hooni | 2003.04.23 | 9626 |
513 | Develop |
[c] 이진트리/트리 순회법 코드(전위/중위/후위)
5 ![]() |
hooni | 2015.07.02 | 21051 |
512 | Develop |
[c] 자료구조 그래프(graph) 소스코드 - 확인해볼 것..
![]() |
hooni | 2013.04.23 | 8008 |
511 | Develop |
[c] 재미있는 코딩..
![]() |
hooni | 2003.04.23 | 21391 |
510 | Develop |
[c] 전위 표기법으로 연산 예제..
![]() |
hooni | 2013.04.23 | 9312 |
509 | Develop |
[c] 정사각배열의 서브 배열의 최대 값 구하기
![]() |
hooni | 2003.04.23 | 7036 |
508 | Develop |
[c] 정수를 2진수로 변환 (재귀,비트연산)
![]() |
hooni | 2003.04.23 | 7602 |
507 | Develop | [c] 지나가는 패킷 잡기 | hooni | 2003.04.23 | 8857 |
506 | Develop |
[c] 지폰(gphone) 소스.. 수정(암호화)
![]() |
hooni | 2013.04.23 | 7439 |