Recommended:

  • phpclasses.org
  • jsclasses.org
  • jsmag.com
  • siteapps.com
  • View our reviews on Hot Scripts
  • JS Tutorial
  • scripts.com
  • securesignup.com




Recent Comments

Powered by Disqus




Back to articles

Mirrored text

Function that not only reverses string, but reverses each line of string, so it looks exactly like in mirror. Check here for example: http://mirrored-text.co.cc/

function rorrim()
{
    reversed = document.getElementById('text').value;
    revertext = reversed.split("");
    revertext = revertext.reverse();
    reversed = revertext.join('');
    var browser=navigator.appName;
    if(browser == "Opera" || browser == "Microsoft Internet Explorer")
    {
        reversed = reversed + 'n';
        revertext = reversed.split('r');
        revertext = revertext.reverse();
        reversed = revertext.join('');
    }
    else if(browser == "Netscape")
    {
        revertext = reversed.split('n');
        revertext = revertext.reverse();
        reversed = revertext.join('n');
    }
    else{alert(browser);}
    document.getElementById('mirror').value = reversed;
}

You may also be interested in:

Powered by BlogAlike.com

blog comments powered by Disqus