Contents

조회 수 11341 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

URL 인코딩~

<html>

<body>

<script type="text/javascript">
  var s;

  s = encodeURI('http://google.com/소 설.html');
  document.write('<p>' + s + '<p>');
  //결과 http://google.com/%EC%86%8C%20%EC%84%A4.html


  s = encodeURIComponent('http://google.com/소 설.html');
  document.write('<p>' + s + '<p>');
  //결과 http%3A%2F%2Fgoogle.com%2F%EC%86%8C%20%EC%84%A4.html


  s = escape('http://google.com/소 설.html');
  document.write('<p>' + s + '<p>');
  //결과 http%3A//google.com/%uC18C%20%uC124.html
</script>

</body>
</html>


?