Maxlength para TextArea con Jquery
maxlength.js es una plugin Jquery que sirve para poder limitar el número de caracteres en un textarea.
Para descargar el archivo jquery.maxlength.js ve a este sitio...
En la web del autor vienen varios ejemplos de como usar este plugin ...
<script type="text/javascript">
$(document).ready(function(){
$('#textarea_1_1').maxlength({
events: [], // Array of events to be triggerd
maxCharacters: 10, // Characters limit
status: true, // True to show status indicator bewlow the element
statusClass: "status", // The class on the status div
statusText: "character left", // The status text
notificationClass: "notification", // Will be added when maxlength is reached
showAlert: false, // True to show a regular alert message
alertText: "You have typed too many characters.", // Text in alert message
slider: false // True Use counter slider
});
});
</script>
No hay comentarios:
Publicar un comentario