我有一个页面核心部分是这样的(其他的我能确保是没有问题的)
<table width="98%" align="center">
<html:form action="beginCourseSettingAction.do" method="post">
<tr>
<td><html:hidden property="teachclassid"/></td>
<td><input name="num"/></td>
</tr>
<tr>
<td><html:submit property="sub" value="确定"/></td>
</tr>
</table>
</html:form>
struts的配置和action绑定的form都是没有问题的;
当我点确定按钮提交后得不到action所绑定的form的值即form中所有的属性都为空现在我的问题时当我把<html:form action="beginCourseSettingAction.do" method="post">这句放到
<table>外面后就可以得到值了;找了很多质料也没找到答案,还望高手来指点指点
为何<html:form>的位置会有这么大的影响另外还有一个问题我把最后的<html:submit property="sub" value="确定"/>按钮换成
<html:button property="sub" value="确定" onclick="formSubmit()"/>
这样我用脚本提交即
<script>
function formSubmit()
{
submit();
}
</script>
这样的话用request.getParameter("num")得不到值,而同样我把
<html:form action="beginCourseSettingAction.do" method="post">
放到<table>外后就可以了.
<table width="98%" align="center">
<html:form action="beginCourseSettingAction.do" method="post">
<tr>
<td><html:hidden property="teachclassid"/></td>
<td><input name="num"/></td>
</tr>
<tr>
<td><html:submit property="sub" value="确定"/></td>
</tr>
</table>
</html:form>
struts的配置和action绑定的form都是没有问题的;
当我点确定按钮提交后得不到action所绑定的form的值即form中所有的属性都为空现在我的问题时当我把<html:form action="beginCourseSettingAction.do" method="post">这句放到
<table>外面后就可以得到值了;找了很多质料也没找到答案,还望高手来指点指点
为何<html:form>的位置会有这么大的影响另外还有一个问题我把最后的<html:submit property="sub" value="确定"/>按钮换成
<html:button property="sub" value="确定" onclick="formSubmit()"/>
这样我用脚本提交即
<script>
function formSubmit()
{
submit();
}
</script>
这样的话用request.getParameter("num")得不到值,而同样我把
<html:form action="beginCourseSettingAction.do" method="post">
放到<table>外后就可以了.
如:
<table>
<html>
.......
</html>
</table>
你不用<html:form,自己写<FORM>呢?也一样吗?
<a>
<bb>
</a>
</bb>
像这种形式是不允许的