»
EnglishFrenchVietnamese

Print - Reserse text - JavaScriptBank.com

Full version: jsB@nk » Form » Textarea » Reserse text
URL: http://www.javascriptbank.com/text-reverser.html

Reserse text © JavaScriptBank.comJavaScript 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.

Full version: jsB@nk » Form » Textarea » Reserse text
URL: http://www.javascriptbank.com/text-reverser.html



JavaScript
<SCRIPT LANGUAGE="JavaScript"><!-- Beginfunction 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><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form><input type=text name=revtext value=hello><input type=button value="Reverse" onClick="reverse(this.form)"></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->