页面通过JS提交 ACTION通过传来不同的值进行处理
function myclick(str){
if(str == "shixiao"){
document.forms[0].shixiao.value=str;
document.forms[0].submit();
}
else if(str == "jjshixiao"){
document.forms[0].jjshixiao.value=str;
document.forms[0].submit();
}
}
第一次点shixiao action正常取到shixiao 页面返回后后再点jjshixiao
第二次点的时候
public class PubinfoAction extends DispatchAction {
public ActionForward GetPubinfo(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
PubinfoForm sup = (PubinfoForm) form;
System.out.println("sup.getShixiao() ===" +sup.getShixiao());
System.out.println("sup.getJjshixiao() ===" +sup.getJjshixiao());
打印出来2个值都能取到。还请各位帮忙分析下