⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userzb.jsp

📁 一个毕业设计网络招标系统实现了招标的业务逻辑内含了数据库sql server备份文件
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<%
	int i=1;

	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String username = (String) session.getAttribute("username");
	
	if (username == null)
		response.sendRedirect("error.jsp?error=usernull");

	String action = request.getParameter("action");
	if (action == null)
		action = "";
	String addproduct = request.getParameter("addproduct");
	if (addproduct == null)
		addproduct = "";
	String stri = request.getParameter("i");
	if (stri == null)
		stri = "";
		else i = Integer.parseInt(stri);
	
	String productnvalue=request.getParameter("productnvalu");
	
	if(productnvalue==null)
	{
	
	productnvalue="";

	}
	else{
	
	}
	
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'userzb.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

		<script language="javaScript">
		function check(){
		
		window.navigate("userzb.jsp?action=1");
		}
		function check1(){
		
		window.navigate("userzb.jsp?action=2");
		}
		function addproduct(){
		
	
		<%if(addproduct.equals("yes")){%>
		var str =document.myform.productname<%=i-1%>.value;
		
		window.navigate("userzb.jsp?action=1&addproduct=yes&i=<%=i+1%>&productnvalu="+str);
		
		
		<%}else{%>
		window.navigate("userzb.jsp?action=1&addproduct=yes&i=<%=i+1%>");
		<%}%>
		
		
		
			}
	
		</script>
	</head>

	<body  background="images/e.jpg"><iframe  height=0></iframe>
		<form action="servlet/zhaobiaoCheck?productsum=<%=i%>" method="POST" name="myform">
			<table width="600" height="298" align="center">
				<tr>
					<td>
						项目名称:
					</td>
					<td colspan="2">
						<input type="text" size="10" name="project_name">
					</td>
				</tr>

				<tr>

					<td>
						项目资金:
					</td>
					<td align="left" colspan="2">
						<input type="text" size="10" name="project_cost">
					</td>

				</tr>
				<tr>
					<td>
						是否有产品参与
					</td>
					<td colspan="2">
					
						<input type="radio" name="rodio" onclick="check1()" value="1" checked="checked">
				
						<input type="radio" name="rodio" onclick="check()" value="2"<%if(action.equals("1")){%>checked="checked"<%} %>>
						
					</td>
				</tr>

				<%
				if (action.equals("1")) {
				%>
		

				<%
				if (addproduct.equals("yes")) {
			
				for(int n = 1;n<i;n++){
				int c= 0;
				
				%>
				<tr>
					<td align="right" colspan="2" valign="bottom">
						产品名称:
					</td>
					<td valign="bottom">
						
							<INPUT type="text" size="10" name="productname<%=n%>">


							产品价格:
							<INPUT type="text" size="5" name="productprice<%=n%>">
							产品说明:


							<TEXTAREA wrap="soft" name="project_content<%=n%>" rows="3" cols="20"></TEXTAREA>
						
					</td>
					
					
			
				
				</tr>
				<%
				c++;
				}}
				%>
				<tr>
					<td>
						<input type="button" value="添加产品" name="button1"
							onclick="addproduct()">
					</td>
				</tr>
				<%
				}
				%>
				
				<tr>
					<td>
						项目说明:
					</td>
					<td colspan="2" align="center">
						<textarea wrap="soft" name="project_content" rows="6" cols="63"></textarea>
					</td>
				</tr>
				<tr>
					<td align="center" colspan="3">
						<input type="submit" value="提交" name="button2">
					
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;<input type="reset" value="重设" name="button3">
				
						
					</td>
			
			
				</tr>
			</table>

		</form>
	</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -