This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Membuat Tulisan Terbalik

By: a guest on Apr 14th, 2013  |  syntax: HTML  |  size: 1.57 KB  |  views: 93  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  4. <title>Membuat Tulisan Terbalik</title>
  5. <style type="text/css">
  6. textarea { font-family: "Arial Unicode MS", terbalik }
  7. </style>
  8. <script language="JavaScript">
  9. function flip() {
  10. var result = flipString(document.f.original.value.toLowerCase());
  11. document.f.flipped.value = result;
  12. }
  13. function flipString(aString) {
  14. var last = aString.length - 1;
  15. var result = new Array(aString.length)
  16. for (var i = last; i >= 0; --i) {
  17. var c = aString.charAt(i)
  18. var r = flipTable[c]
  19. result[last - i] = r != undefined ? r : c
  20. }
  21. return result.join('')
  22. }
  23. var flipTable = {
  24. a : '\u0250',
  25. b : 'q',
  26. c : '\u0254',
  27. d : 'p',
  28. e : '\u01DD',
  29. f : '\u025F',
  30. g : '\u0183',
  31. h : '\u0265',
  32. i : '\u0131',
  33. j : '\u027E',
  34. k : '\u029E',
  35. //l : '\u0283',
  36. m : '\u026F',
  37. n : 'u',
  38. r : '\u0279',
  39. t : '\u0287',
  40. v : '\u028C',
  41. w : '\u028D',
  42. y : '\u028E',
  43. '.' : '\u02D9',
  44. '[' : ']',
  45. '(' : ')',
  46. '{' : '}',
  47. '?' : '\u00BF',
  48. '!' : '\u00A1',
  49. "\'" : ',',
  50. '<' : '>',
  51. '_' : '\u203E',
  52. '\\' : '/',
  53. ';' : '\u061B',
  54. '\u203F' : '\u2040',
  55. '\u2045' : '\u2046',
  56. '\u2234' : '\u2235'
  57. }
  58. for (i in flipTable) {
  59. flipTable[flipTable[i]] = i
  60. }
  61. </script>
  62. </head>
  63. <body linkifytime="0" linkified="0" linkifying="false">
  64. <h1>Membuat Tulisan Terbalik</h1>
  65. <form name="f">
  66. Tulisan Asli: <br>
  67. <textarea rows="6" cols="50" name="original" onkeyup="flip()"></textarea>
  68. <br>
  69. Tulisan Terbalik: <br>
  70. <textarea rows="6" cols="50" name="flipped"></textarea>
  71. </form>
  72. Powered by <a href="http://twitter.com/7center">7center</a>
  73. </body>
  74. </html>
clone this paste RAW Paste Data