@Html.TextBox("User", "", new { maxlength = 10 }); //限制 text 的最大输入字符数为 10个
@Html.TextBox("users","",new {@class="l-text",style="width:186px;"}) //指定 text的宽度
//ligerui 里的用法如下: (通过 l-test,l-textrea 设置ui) <div class="Input"> @Html.TextBox("Users", "", new { @class = "l-text", style = "width: 486px !important;" }) </div> <div class="lbl"> @Html.Label("留言内容:") </div> <div class="Input"> @Html.TextArea("Content", "", 13, 100, new { @class = "l-textarea" }) </div>