Want to surprise your friends on Facebook, Twitter or Google Plus?
How does this work? The text appears to be upside down (flipped), and it is possible to paste it into text boxes on Facebook and other websites, even though there is no such thing as an upside down character set. Some drawing programs offer text rotation, but that is handled at the application level. So how does upside text work in normal text input fields? Most websites nowadays support Unicode, which is a universal standard to represent text in computers. Unicode consists of tens of thousands of characters. The first 127 characters of Unicode are ASCII.Type text: Ħuʍop ǝpısdn ɹɐǝddɐ ןןıʍ ʇı
upsideDownText()function each time a key is released:
We do the text processing in the<textarea rows="5" cols="70" id="src" onkeyup="upsideDownText()"></textarea>
id="src". We only process lower case letters, so we convert the string to lowercase using the
toLowerCase()method. We could try to convert upper and lowercase characters; that is an exercise left to the interested reader. Then we loop through the string, character by character, starting from the end of the string. A big if-then-else-if block handles the character conversion. Finally we push the converted string into the text box identified by