문자열 <-> 유니코드 변환 escape(),unescape()

String Unicode

<style>
temp20020232 tr,*{
font-family:Arial, Helvetica, sans-serif;
font-size:9pt;
}
</style>
<script>
function char_unicode(bool){
ta1 = document.getElementById('txt_char');
ta2 = document.getElementById('txt_unicode');
 if(bool)
 ta2.value = escape(ta1.value);
 else
 ta1.value = unescape(ta2.value);
}
</script>
<table  border="0" cellspacing="0" cellpadding="0" class="temp20020232">
  <tr>
    <td align="center"><strong>String</strong></td>
    <td align="center"><strong>Unicode</strong></td>
  </tr>
  <tr>
    <td align="center"><textarea name="txt_char" cols="40" rows="5" id="txt_char" ></textarea></td>
    <td align="center"><textarea name="txt_unicode" cols="40" rows="5" id="txt_unicode2" ></textarea></td>
  </tr>
  <tr align="center">
    <td align="center"><input type="button" name="Submit" value="escape(String)->Unicode" onClick="char_unicode(true);"></td>
    <td><input type="button" name="Submit2" value="unescape(Unicode)->String" onClick="char_unicode(false);"></td>
  </tr>
</table>
댓글
  • No Nickname
    No Comment
  • 권한이 없습니다.
    {{m_row.m_nick}}
    -
목록형 📷 갤러리형
제목
[기본형] HTML (with 부트스트랩5.3 , jquery 3.7, vue.js)
유용한 리눅스(LINUX) 명령어
[공지] 기술 게시판
4.28
4.29
4.30
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
5.11
5.12
5.13
5.15
5.16
5.17
5.18
5.19
5.20
5.21
5.22
5.23
5.24
5.25
5.26
5.27
5.28
5.29
5.30
5.31
6.1