Dla max: patrz poniżej kodu
Zastosowanie maxlength
dla maksymalnej postaci.
maxlength="nuber_of_characters"
Źródło: http://www.w3.org/TR/html5/forms.html#the-textarea-element
na min:source
Zastosowanie JavaScript poniżej:
stosowanie atrybutu ID <textarea>
. Zestaw atrybut id do Minle (EG), tj id="minle"
<textarea rows="10" cols="80" maxlength="200" required id="minle" >
</textarea>
i umieścić następującą js segment kodu w form
tagu
<form action="mango.php" method="post" id="form12" onsubmit="var text = document.getElementById('minle').value; if(text.length < 80) { alert('put more info!'); return false; } return true;">
Ten użytkownik nie pozwoli na wejście. w postaci od 80 do 200
zobaczyć link http://stackoverflow.com/questions/10281962/is-it-minlength-in-html5 – devanathan
oto przykład http://jsfiddle.net/xhqsB/104/ – Ali