【发布时间】:2016-01-08 04:13:35
【问题描述】:
<body>
<h3>Register for a prize by completing this form.</h3>
<s:form action="register">
<s:textfield name="personBean.firstName" label="First name" />
<s:textfield name="personBean.lastName" label="Last name" />
<s:textfield name="personBean.email" label ="Email"/>
<s:textfield name="personBean.age" label="Age" />
<input type="checkbox" checked="checked" />
<s:submit/>
</s:form>
<input type="checkbox" checked="checked" />
</body>
我有一个包含以上内容的jsp。表单内的复选框未选中,而表单外的复选框已预先选中。我在 Struts2 表单中混合了普通的 html 复选框和非 html 元素。
【问题讨论】: