To output the "scissors" symbol from Unicode, I request them by code like this:
alert(String.fromCharCode(✂)); However, there is no alert. Wrapped the code in quotes, still no. Tell me where was wrong?
To output the "scissors" symbol from Unicode, I request them by code like this:
alert(String.fromCharCode(✂)); However, there is no alert. Wrapped the code in quotes, still no. Tell me where was wrong?
The String.fromCharCode method takes a number as an argument. You try to transfer to it an invalid (from the point of view of JS) construction. Quoting this construct does not help either, since, I repeat, you need a number .
Here is an example of how to pass a hex number as an argument:
alert(String.fromCharCode(0x2702)); JSFiddle working example .
Source: https://ru.stackoverflow.com/questions/663808/
All Articles
alert(String.fromCharCode(0x2702));works great ... - Mike