hqxg.jsp
来自「这是一个学习jsp的基本程序」· JSP 代码 · 共 118 行
JSP
118 行
<%@ page language="java" contentType="text/html; charset=GBK" import="imis.*,javax.naming.*,javax.rmi.PortableRemoteObject,java.util.*"%><% request.setCharacterEncoding("GBK"); session=request.getSession(); userStruct user=(userStruct)session.getAttribute("user"); if(user==null){ response.sendRedirect("../../login.html"); }else{%><%Context psctx=new InitialContext();Object psref=psctx.lookup("OfficeUnitController");OfficeUnitControllerHome officeUnitControllerHome=(OfficeUnitControllerHome) PortableRemoteObject.narrow(psref,OfficeUnitControllerHome.class);;OfficeUnitController officeUnitController=officeUnitControllerHome.create();String planyear = request.getParameter("planyear");String unitid = request.getParameter("unitid");session=request.getSession();Collection c = (Collection)session.getAttribute("hqcollect_d");Collection collect = new ArrayList();String devname = request.getParameter("devname");Iterator i = c.iterator();while(i.hasNext()){PlandetailsStruct pds = (PlandetailsStruct)i.next();if(pds.devicename.equals(devname)){collect.add(pds);}}//session.removeAttribute("hbzcollect_d");%><HTML><HEAD><META http-equiv=Content-Type content="text/html; charset=gb_2312-80"><link rel="stylesheet" href="../../css/stii.css" type="text/css"></HEAD><BODY><form name="myform" method="post" action="hqxged.jsp"><table width=600 class=title cellspacing=0 cellpadding=0 border=1 align=center ><caption align=center><font size=6>上报申请修改</font></caption><tr align=center><td>设备名称<td>申请单位<td>设备数量<td>设备总价(万元)</tr><%Vector pdv = new Vector();int count = 0;i = collect.iterator();while(i.hasNext()){ PlandetailsStruct pds = (PlandetailsStruct)i.next(); Collection ousc = officeUnitController.getUnitid(pds.unitid); Iterator ousi = ousc.iterator(); officeUnitStruct ous = (officeUnitStruct)ousi.next(); String name_amount = "amount"+count; String name_price ="price"+count; pdv.addElement(pds);%><tr align=center><td><%=pds.devicename%><td><%=ous.processname%><td><input type=text value="<%=pds.appamount%>" name="<%=name_amount%>"><td><input type=text value="<%=pds.deviceprice%>" name="<%=name_price%>"></tr><%count++;}session.setAttribute("hqpdv",pdv);%><tr align=center><td colspan=4><input type=hidden name="planyear" value="<%=planyear%>"><input type=hidden name="unitid" value="<%=unitid%>"><input type=submit name="fdsaf" value=" 确 定 " class="file" onClick="return confirm('请确认设备数量和设备总价输入正确!')"> <input type=reset name="gr" value=" 还 原 " class="file"> <input type=button name="gfsaf" value=" 取 消 " class="file" onClick="javascript:history.go(-1)"></td></tr></table></form></BODY></HTML><%}%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?