Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的应用程序中广泛使用了 Struts2。现在我想添加 HTML5 属性,例如autocorrect和type="email"。我没有看到任何 HTML5 插件。<s:textfield..>例如,标签是否有标准方式?
autocorrect
type="email"
<s:textfield..>
您可以将HTML5属性直接添加到textfield标签中。我已经成功地完成了它pattern,min并且max它们在 HTML 中正确呈现。
HTML5
textfield
pattern
min
max
<s:textfield type="number" name="..." value="%{...}" pattern="[0-9]+" min="40" max="700" />
这是一个基于弹簧的应用程序。我在 JSP 中的表单定义如下,
<form:form modelAttribute="article" enctype="multipart/form-data" method="POST" action="${sendE