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

📄 order.jsp

📁 简单的网上图书书店
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>order.jsp</title>
</head>
<%@page import="java.util.*" %>
<body>

<%
LinkedList clsName=(LinkedList)session.getAttribute("lsName");
LinkedList clsType=(LinkedList)session.getAttribute("lsType");
LinkedList clsPrice=(LinkedList)session.getAttribute("lsPrice");
LinkedList clsOff=(LinkedList)session.getAttribute("lsOff");
LinkedList clsId=(LinkedList)session.getAttribute("lsId");
LinkedList clsNumber=(LinkedList)session.getAttribute("lsNumber");
LinkedList clsTotal=(LinkedList)session.getAttribute("lsTotal");
String username=new String(((String)session.getAttribute("username")).getBytes("ISO-8859-1"),"gb2312");
String password=new String(((String)session.getAttribute("password")).getBytes("ISO-8859-1"),"gb2312");
	
out.println("Order List:<br>");
	
String orderlist="username:"+username+"&";
orderlist+="password:"+password+"&";
String _orderlist="username:"+username+"<br>";
_orderlist+="password:"+password+"<br>";
	
float _total=(new Float("0.0")).floatValue();
	
for (int i=0;i<clsName.size();i++)
{
	String name=(String)clsName.get(i);
	String type=(String)clsType.get(i);
	String price=(String)clsPrice.get(i);
	String off=(String)clsOff.get(i);
	String id=(String)clsId.get(i);
	String number=(String)clsNumber.get(i);
	Float total=(Float)clsTotal.get(i);
	_total+=total.floatValue();
		
	orderlist+="No."+i+"&";
	orderlist+="goodsname:"+name+"&";
	orderlist+="goodstype:"+type+"&";
	orderlist+="goodsprice:"+price+"&";
	orderlist+="goodsoff:"+off+"&";
	orderlist+="goodsid:"+id+"&";
	orderlist+="goodsnumber:"+number+"&";
	orderlist+="goodstotal:"+total+"&";
	
	_orderlist+="No."+i+"<br>";
	_orderlist+="goodsname:"+name+"<br>";
	_orderlist+="goodstype:"+type+"<br>";
	_orderlist+="goodsprice:"+price+"<br>";
	_orderlist+="goodsoff:"+off+"<br>";
	_orderlist+="goodsid:"+id+"<br>";
	_orderlist+="goodsnumber:"+number+"<br>";
	_orderlist+="goodstotal:"+total+"<br>";
}
orderlist+="Total Count:"+_total+"#";
_orderlist+="<br>Total Count:"+_total+"<br>";
out.println(_orderlist);
%>
	
<form action="doOrder.jsp" method="post" target="_top">
<input type="hidden" value="<%=orderlist%>" name="orderlist">
<input type="hidden" value="<%=_total%>" name="total">
<input type="submit" value="马上结账">
</form>

<form action="../indexServlet?cmd=main" method="post" target="_top">
<input type="submit" value="再看看">
</form>
</body>
</html>

⌨️ 快捷键说明

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