我正在使用以下html标记:
@Html.TextAreaFor(Model => Model.TaxID,
new {styles = "width:30%; border-color: black; maxlength: 9" @placeholder = "xxxxxxxxx"})
我无法检索任何样式,最大长度超过9个字符,并且@placeholder抛出错误。有人可以帮我这个忙。
正确的做法是这样的,请注意,它应该是“ style”而不是“ styles”,而且您还错过了style和占位符之间的,
:
new { placeholder = "xxx", maxlength=9, style = "width:30%; border-color: black;" }