把asc码值转换成字符,比如:alert(String.fromCharCode(65)),你就会看到A

解决方案 »

  1.   

    >>charCodeAt是不是它的反函数呢
    返回一个整数,该整数表示 String 对象中指定位置处的字符的 Unicode 编码
    function charCodeAtTest(n){
      var str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; //Initialize variable.
      var n;                                  //Declare variable.
      n = str.charCodeAt(n - 1);              //Get the Unicode value of the
                                              // character at position n.
      return(n);                              //Return the value.
    }