簡體   English   中英

在ASP中將最大長度設置為“文本區域”

[英]To set the maximum length to Text Area in ASP

限制可以輸入到asp文本區域的最大字符數的最佳方法是什么?

最好的方法是必須計算在文本區域中輸入的文本數,並在長度(輸入的文本)達到最大時限制文本。

例如。 可以在以下位置找到Javascript代碼: http : //www.mediacollege.com/internet/javascript/form/limit-characters.html

<div class="col-md-3"><asp:TextBox ID="TbxUserName" runat="server" type="text" class="form-control intxt" placeholder="Enter User Name" MaxLength="30"></asp:TextBox></div>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM