这是一个创建于 2934 天前的主题,其中的信息可能已经有所发展或是发生改变。
<%@ taglib prefix="c" uri="http://www.springframework.org/tags/form" %>
引用了 spring mvc
<c:input path="username" class="form-control" placeholder="Username"/>
这里引用了 c:input 标签,后面插入了一些属性
解析成 html 客户端是这样的
<input id="username" name="username" placeholder="Username" class="form-control" type="text" value=""/>
但是插入了 required autofocus 之后 变成这样
<c:input path="username" class="form-control" placeholder="Username" required autofocus />
却无法解析了
难道所有框架的标签都无法完全按 html 来书写?
4 条回复 • 2016-09-19 21:09:34 +08:00
|
|
1
q397064399 2016-09-16 08:59:44 +08:00
好吧,我知道了 后面的是 HTML5 属性, Spring 貌似不能解析
|
|
|
2
q397064399 2016-09-16 09:07:01 +08:00
stackoverflow 大法好 autofocus="autofocus" 解决, Spring 真的太远古了
|