引入js
//引入js文件<script src="../../../../Content/Scripts/Tool.js" type="text/javascript"></script>//给组件添加三个属性,和一个change事件EmptyText="1000字以内" MaxLength="1000" EnforceMaxLength="true"如下例子所示<ext:TextArea runat="server" ID="txTrackingShows" FieldLabel="项目跟踪说明" LabelAlign="Right" LabelWidth="90"Flex="1" MarginSpec="0 20 0 0" IndicatorText="*" IndicatorCls="_Indicator" AllowBlank="false" EmptyText="1000字以内"MaxLength="1000" EnforceMaxLength="true"><Listeners><Change Handler="LimitTextLength(this)" /></Listeners></ext:TextArea>
