Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1662 Is there a way to restrict number of characters within a textarea?

You are here: irt.org | FAQ | JavaScript | Form | Q1662 [ previous next ]

Try:

<form>
<textarea onKeyUp="if (this.value.length > 100) { alert('100 chars max'); this.value = this.value.substring(0,99); }">
</textarea>
</form>

Feedback on 'Q1662 Is there a way to restrict number of characters within a textarea?'

©2018 Martin Webb