»
AnglaisFran�aisVietnamien

Imprimer - Format d'entrée script - JavaScriptBank.com

Version compl�te: jsB@nk » Snippet » Format d'entrée script
URL: https://www.javascriptbank.com/format-input-script.html

Format d'entrée script © JavaScriptBank.comFormat du texte dans une forme de cas, d'en inverser le texte, ou de voir le code ASCII derrière l'entrée. Cool!

Version compl�te: jsB@nk » Snippet » Format d'entrée script
URL: https://www.javascriptbank.com/format-input-script.html



JavaScript
<SCRIPT LANGUAGE="JavaScript">// Phillip Bryant ([email protected])<!-- Beginfunction reverse() {text = "";str = document.forms[0].elements[0].value=document.forms[0].elements[0].value;for (i = 0; i <= str.length; i++)text = str.substring(i, i+1) + text;document.forms[0].elements[0].value = document.forms[0].elements[0].value = text;}function lower() {document.forms[0].elements[0].value = document.forms[0].elements[0].value.toLowerCase()}function caps() {document.forms[0].elements[0].value = document.forms[0].elements[0].value.toUpperCase()}function whatIsThis() {document.forms[0].elements[0].value = escape(document.forms[0].elements[0].value)}function dontLikeThis() {document.forms[0].elements[0].value = unescape(document.forms[0].elements[0].value)}var t = new Array();t[0] = "Here is some text to use as an example. Click on reverse, uppercase, or lowercase.";function example() {for(var i = 0; i < 2; i++) {if(document.forms[0].elements[i].value) {document.forms[0].elements[0].value = document.forms[0].elements[0].value+unescape(t[0]);      }   }}var f = new Array();f[0] = "http%3A//www.JavaScriptBank.com";function exAscii() {for(var i = 0; i < 2; i++) {if(document.forms[0].elements[i].value) {document.forms[0].elements[0].value = document.forms[0].elements[0].value+unescape(f[0]);      }   }}//  End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form action="" method="post"><textarea rows=10 cols=40 wrap=soft></textarea><table border=0><center><tr><td><input type=button value="Example" onClick="example(this.form)"><input type=button value="Reverse" onClick="reverse()"><input type=button value="All Upper" onClick="caps()"><input type=button value="All Lower" onClick="lower()"></td></tr><tr><td><input type=button value="Ascii Example" onClick="exAscii()"><input type=button value="UnAscii" onClick="dontLikeThis()"><input type=button value="Ascii" onClick="whatIsThis()"><input type=button value="Clear It" onClick="reset()"></td></tr></table></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->