JS中ASCII码值和中文互转

<script type="text/javascript">

    var code = "这".charCodeAt(0);
    alert(code);
    alert(String.fromCharCode(code));

</script>

posted @ 2012-09-20 10:48  沉默不语  阅读(2802)  评论(0)    收藏  举报