?
?
?
<html> <head> <title>测试专用页 </title> </head> <body> <form method=post name=ceshi action="index.htm"> <textarea name=textarea1 onpropertychange=checkMaxLen(this,20,0)></textarea> </form> </body> <html> <script language=javascript> var oldValue=new Array(); function checkMaxLen(obj,maxlength,num){ if(obj.value.length>maxlength){ obj.value=oldValue[num]; } else{ oldValue[num]=obj.value; } } </script>
?