日期:2014-05-16 浏览次数:20474 次
<div class="center"><textarea name="salesOrderComment" onpropertychange="checkMaxLen(this,300,0)" cols="60" rows="5" style="width:500px;">${checkoutModel.salesOrderComment }</textarea></div
<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>
?以上就可以控制输入的字数。?