maxlength
textarea
function enforceTextAreaMaxLen() { $('textarea[maxlength]').keyup(function () { var textbox = $(this); var maxlength = textbox.attr('maxlength'); if (maxlength != undefined) { var x = parseInt(maxlength); var s = textbox.val(); if (s != null && s.length > x) { textbox.val(s.substring(0, x)); } } }); }
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.