Javascript examples for String:fromCharCode
The fromCharCode() method converts Unicode values into characters.
Parameter | Description |
---|---|
n1, n2, ..., nX | Required. One or more Unicode values to be converted |
A String, representing the character(s) representing the specified unicode number(s)
The following code shows how to Convert a Unicode number into a character:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//from w w w . j a va 2s .c om var res = String.fromCharCode(72, 69, 76, 76, 79); document.getElementById("demo").innerHTML = res; } </script> </body> </html>