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 http://www.yaldex.com/ 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 -->
</script>
<form>
<input
type=text name=revtext value=hello>
<input
type=button value="Reverse" onClick="reverse(this.form)">
</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!).

Play best online gaming casino Odds805 Situs Judi Online in Indonesia


©