Script Categories

Forms >>> Text Reverser.

JavaScript will take the contents of a box and reverse it! If you entered 'hello' it will change the box to say 'olleh'. This might be useful on your site in a form or just for fun.

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
function reverse(form) {
text = "";
str = form.revtext.value;
for (i = 0; i <= str.length; i++)
text = str.substring(i, i+1) + text;
form.revtext.value = text;
//  End -->
type=text name=revtext value=hello>
type=button value="Reverse" onClick="reverse(this.form)">

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).