怎样用javascript提交strtus表单 在线等待
<form-bean name= "userinfoForm " type= "chojo.struts.form.UserinfoForm " />
userinfo.jsp
<html:form action = "userinfo.do " focus = "userid " method = "post ">
<td> <html:button property= "button " onclick = "JavaScript:delSubmit(this) "> delete </html:button> </td>
</html:form>
js
function delSubmit(obj){
document.userinfoForm.action = "/WebRoot/deluser.do ";
document.userinfoForm.submit();
}
为什么 document.userinfoForm.submit(); 报错,而不提交表单,求高手解决方法
------解决方案--------------------document.userinfoForm.action = " <%=request.getContextPath()%> /WebRoot/deluser.do ";
document.userinfoForm.submit();
------解决方案--------------------deluser.do和userinfo.do
在stucts-config.xml是怎么定义的
------解决方案-------------------- <html:form action = "userinfo.do " focus = "userid " method = "post " id= "uf ">
这里加一个id
js:
document.getElementById( "uf ").submit();
------解决方案--------------------报什么错 ??