这段是放在bodyonload ();刚才做的action :
document.OTNotesForm.action = contextPath + "/ot/SearchCareproviderOTNotesAction.do?setter="+setter+"&"+type+"="+ParamEncode(value)+"&CareProviderType="+ParamEncode(careproviderType);
在JSP上的JAVA巧调用javascript 方法
用的: out.println("javascript 方法(参数1,参数2);");
<%
if(request.getAttribute("PopupCareProviderSearch") != null){
String setter = request.getParameter("setter");
String careProviderCode = request.getParameter("CareProviderCode");
String careProviderName = request.getParameter("CareProviderName");
String careProviderType = request.getParameter("CareProviderType");
careProviderCode = careProviderCode == null? "": careProviderCode;
careProviderName = careProviderName == null? "": careProviderName;
out.println("popupCareProvider('"+setter+"','"+careProviderCode+"','"+careProviderName+"','"+careProviderType+"',true);");
}
if(request.getAttribute("RefreshPatientBar") != null){
out.println("top.refreshPatientBar();");
}
if(request.getAttribute("PopupOrderItemSearch") != null){
String setter = request.getParameter("setter");
String itemCode = request.getParameter("searchCode");
String itemName = request.getParameter("searchDesc");
itemCode = itemCode == null? "": itemCode;
itemName = itemName == null? "": itemName;
out.println("popupOrderItemSearch('"+setter+"','"+itemCode+"','"+itemName+"',true);");
}
String y = request.getParameter("y");
if(y != null){
out.println("document.body.scrollTop="+y+";");
}
%>