»
AnglaisFranaisVietnamien

Imprimer - Max Entrée - JavaScriptBank.com

Version complte: jsB@nk » Form » Validation » Max Entrée
URL: https://www.javascriptbank.com/max-entry.html

Max Entrée © JavaScriptBank.comAssurez-vous que votre visiteur ne doit pas excéder le nombre maximum de caractères que vous voulez accepter un formulaire. Trop court!

Version complte: jsB@nk » Form » Validation » Max Entrée
URL: https://www.javascriptbank.com/max-entry.html



JavaScript
<SCRIPT LANGUAGE="JavaScript"><!-- Beginfunction checkchars(form) {var max=15;if (form.chars.value.length > max) {alert("Please do not enter more than 15 characters.  Please shorten your entry and submit again.");return false;   }else return true;}// End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form onsubmit="return checkchars(this)">Please type 15 characters or less.<br><textarea rows=5 cols=30 name=chars wrap=virtual></textarea><br><input type=submit value="Submit!"></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->