Download JavaScript Code Examples, Tutorials, Reference

Provide thousands of free JavaScript code examples, DHTML, HTML JavaScript Tutorials, Reference and Help. JavaScriptBank.com is the best JavaScript resources




Over 2000+ free Javascript
at JavaScriptBank.com Website

Sampled by JavaScriptBank.com
Type text into the box and click 'Convert' to make it appear backwards!

The Rundown

This script will make the text you type in the box appear backwards. Try it.

 

The Script

Below is the script that powers the Backwards Text Generator.
function back()
{
var thestring="";
var yt="<h3>Your Text</h3>";
var text = document.forms[0].elements[0].value;
var filter = new RegExp('([\\f\\n\\r\\t\\v ])+', 'gi');
var data = text.replace(filter," ");
data = data.replace(/</gi,"").replace(/>/gi,"");
for (var i=data.length-1;i>=0;i--) {
thestring+=data.charAt(i);
}
document.getElementById("where").innerHTML=yt;
document.getElementById("where").innerHTML+=thestring;
}