代码如下: <head> <title>JS限制Textarea文本域字符个数</title> <meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ /> [removed] <!–// function textCounter(field, countfield, maxlimit) { // 函数,3个参数,表单名字,表单域元素名,限制字符; if (field.value.len