是一个字符串拼接的函数,结果放到sentchangenum中。

解决方案 »

  1.   

    果然厉害。不过我不是很明白code>=65281&&code<65373和str.charCodeAt(i)-65248有什么作用。请指点,谢谢。
      

  2.   

    METHOD:  String::fromCharCode --------------------------------------------------------------------------------
    String.fromCharCode(num1,..........,numN)This method takes the specified Unicode values and returns a string (but not a String object). Note that this method is a static method of String. Therefore, it is not used as a method of a String object that you have created. The syntax is always String.fromCharCode() as opposed to myStringObject.fromCharCode().The following code takes the specified Unicode values and writes the resulting string to the document.Code:
    document.write (String.fromCharCode(67,65,66))Output:
    CABMETHOD:  String::charCodeAt --------------------------------------------------------------------------------
    object.charCodeAt(index)This method returns a character's Unicode value from a string by referring to its index within that string. The characters in a string are indexed from left to right with the first character indexed as 0 and the last as String.length - 1.The following code reads a character from the string at the specified index and writes its Unicode value to the document.Code:
    myString = new String("charCodeAt method demonstration.")
    document.write (myString.charCodeAt(2))Output:
    97 code>=65281&&code<65373
    这句的意思应该是限定字符的unicode码应该在一定范围内,是什么值我就不清楚了