jQuery maxlength Plugin Usage <script type="text/JavaScript" src="path/to/jquery.maxlength.js" /> Use it like: $("#myElementId").maxlength(/*options*/);