jsp页面如何传参给action

就是jsp页面有个id参数,需要传送到action中以便操作,不知这种jsp向action传参是如何实现的,谢谢!

1)[code="html"]

function sub(){ window.location.href = "<%= request.getContextPath() %>/[你ACTION的别名].do?method=[你接受方法名]&[你传的参数名]="+[参数值] }

[/code]]
用链接方式提交
2)[code="html"]



/html:form
[/code]]
用表单提交方式提交
这两种后台都是用String id = request.getParameter("id");的方式来接受

当然 你用form表单传的话, 更简单…… 我就不一一列举了

1.表单提交
document.formname.submit();
2.js提交
window.open();,window.location.href = "";

把input标签的类型设置为hidden,这样就为隐藏的了,在服务端用request.getParamater()方法来获得设置为hidden类型的input的值