yanmin

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  16 随笔 :: 1 文章 :: 9 评论 :: 0 Trackbacks

这段是放在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+";");
  }  
 %>
posted on 2006-09-06 19:45 yanmin 阅读(1897) 评论(1)  编辑  收藏

评论

# re: 在JSP上的JAVA巧调用javascript 方法 2008-04-17 18:24 Noshoeman
突然看到熟悉的PatientBar……没想到这样也能找到yanmin…………  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: