Demo:
- Code:
http://thathiep.forumvi.com/h1-page
- Code:
<img src="http://tx5.engine.flamingtext.com/netfu/tmp28010/coollogo_com-3827928.gif"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Viết chữ lộn ngược</title> <script type="text/javascript"> function flip() { var result = flipString(document.f.original.value); document.f.flipped.value = result; }
function flipString(aString) { var last = aString.length - 1; var result = new Array(aString.length); for (var i = last; i >= 0; --i) { var c = aString.charAt(i); var r = flipTable[c]; r = r ? r : flipTable[c.toLowerCase()]; result[last - i] = r ? r : c; } return result.join('') }
var flipTable = { a : '\u0250', b : 'q', c : '\u0254', //open o -- from pne d : 'p', e : '\u01DD', f : '\u025F', //from pne g : '\u0183', h : '\u0265', i : '\u0131', //from pne j : '\u027E', k : '\u029E', //l : '\u0283', m : '\u026F', n : 'u', r : '\u0279', t : '\u0287', v : '\u028C', w : '\u028D', y : '\u028E', H : 'H', I : 'I', O : 'O', W : 'M', Z : 'Z', S : 'S', X : 'X', V : '\u039B', C : '\u03FD', '.' : '\u02D9', '[' : ']', '(' : ')', '{' : '}', '?' : '\u00BF', //from pne '!' : '\u00A1', "\'" : ',', '<' : '>', '_' : '\u203E', '\u203F' : '\u2040', '\u2045' : '\u2046', '\u2234' : '\u2235', '\r' : '\n' }
for (i in flipTable) { flipTable[flipTable[i]] = i } </script> </head> <body> <form name="f"> <strong>Bước 1: Nhập vào chữ mà bạn muốn lộn ngược:</strong> <br> <textarea rows="5" style="width: 100%;" name="original" onkeyup="flip()" onFocus='this.value=""'>.</textarea> <strong> <br /> Bước 2: Copy chữ lộn ngược vào Forum... </strong> <br /> <textarea rows="5" style="width: 100%;" name="flipped">.</textarea> </form> </body> </html>
|