js ASCII码 转 字符 ,字符 转 ASCII码

//ASCII码转换字符
function asciiToStr(code) {
    //alert("code:" + code + "
字符:" + String.fromCharCode(code));
    return String.fromCharCode(code);
}
//字符转换ASCII码
function strToAscii(str) {
    return str.charCodeAt();
}
原文地址:https://www.cnblogs.com/jcdd-4041/p/4226890.html