JavaScript fromCharCode method
The fromCharCode method is used to convert one or more Unicode values into (caps) strings and return the string. The syntax is as follows:
The code copy is as follows:
String.fromCharCode( num1, num2, ... )
Parameter description:
| parameter | illustrate |
|---|---|
| num1/num2 | Required. Unicode encoded values |
Tip: This method is a static method of String, and its syntax should be String.fromCharCode(), not for String objects you created yourself.
fromCharCode method example
The code copy is as follows:
<script language="JavaScript">
document.write(String.fromCharCode(106,98,53,49).toLowerCase());
</script>
Run this example and output:
The code copy is as follows:
jb51
For common character Unicode values, see the article "JavaScript onKeyDown Event".