Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
is there a html code to transform text into unicode and alter the resulting number?
Basically I want to be able to change (for example) "hark through yonder window breaks" into
"0068 0061 0072 006B 0020 0074 0068 0072 006F 0075 0067 0068 0020 0079 006F 006E 0064 0065 0072 0020 0077 0069 006E 0064 006F 0077 0020 0062 0072 0065 0061 006B 0073"
then take off the beginning two zeroes on them, group them by two, double the first and add the second to it, and then transform it back into text
I need a few more things than that for what I'm wanting to do (like an "if ... than", and a random number for certain letters) , but I'll settle for what I can get...
1 Answer
- ChrisLv 77 years ago
You can use the String.charCodeAt(x) function:
alert( "Hello".charCodeAt(1) ); // print keycode of "e"