jsp页面之间传值

xxxlist.jsp:

$("#${lowerCaseModuleName}List").createDialog({
width:450,
height:300,
title:'注销提示',
modal:true,
url:'${path}/baseinfo/siteinfo/dangerousChemicalsUnit/emphasiseConditionDlg.jsp?locationIds='+selectedIds+'&isEmphasis=false&dailogName=${lowerCaseModuleName}',
buttons: {
   "保存" : function(event){
   $("#emphasisForm").submit();
   },
   "关闭" : function(){
        $(this).dialog("close");
   }
}
});


emphasiseConditionDlg.jsp


   <div id="emphasis-form"  style="width: 400px;height: 110px" >
   <form id="maintainForm" method="post">
   <input type="hidden" name="locationIds"  id="locationIds" value="${locationIds}" />
   <input type="hidden" name="dangerousChemicalsUnit.isEmphasis" id="isEmphasis" value="${isEmphasis}" />
   <input type="hidden" name="dailogName" id="dailogName" value="${dailogName}" />

     <div class="grid_4 lable-right">
         <label class="form-lbl">注销时间:</label>
     </div>
     <div class="grid_7">
         <input type="text" name="logOutTime" id="logOutTime"  disabled="disabled" class="dialogtip form-txt"
        maxlength="20" />
     </div>
     ……
</form >
</div>

我想当然的用隐藏的input接收list页面传来的参数,但是结果发现参数传不过来。 正确的写法如下:用request.getParameter接收参数值




把上面jsp页面蓝色部分换成如下代码:
<input type="text" name="locationIds" id="locationIds" value="<%=request.getParameter("locationIds")%>"/>
   <input type="hidden" name="dangerousChemicalsUnit.isEmphasis" id="isEmphasis" value="<%=request.getParameter("isEmphasis")%>" />
   <input type="text" name="dailogName" id="dailogName" value="<%=request.getParameter("dailogName")%>" />
   

你可能感兴趣的:(jsp页面的传值)