当我将s:textfield插入到表单内的其他HTML元素之间时,为什么将它放在底部? 我该如何解决这个问题?
<label><span class="required">*</span>First name</label>
<input type="text" id="firstName" name="firstName" value=""><br>
<div>
<s:select id="selectDrop" list="list" name="list"/>
</div>
<label><span class="required">*</span>Last name</label>
<input type="text" id="lastName" name="lastName"><br>
浏览器结果:
名字
姓氏
“下拉元素”
答案 0 :(得分:0)
好的,我实际上可以通过在s:form元素中添加from =“simple”来解决。
<s:form id="registrationForm" action="/registration/.action" method="post" theme="simple">
我想如果我不添加属性,Struts2 UI组件会添加自己的样式表,从而获得堰行为。