1. Computing
Send to a Friend via Email

Limiting Textarea Text

Introduction

Unlike input fields where you can use a maxlength sub-parameter to specify the maximum field length, there is no way using just html to restrict the length of a textarea field. Instead, you need to use javascript to test the length of what the user has entered as they enter it and stop accepting their input when they have reached your limit.

Let's start by looking at how the script works .

©2014 About.com. All rights reserved.