📄 dobuy.jsp
字号:
<%@page import="javabean.*" %>
<%@page import="java.sql.*" %>
<%@page import="service.*" %>
<%@page import="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=gb2312" %>
<% request.setCharacterEncoding("GB2312"); %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {
font-size: 36pt;
font-weight: bold;
color: #0066FF;
}
.STYLE2 {color: #FF0000}
.STYLE3 {font-size: 24px; font-weight: bold; color: #0066FF; }
-->
</style>
</head>
<%!
ResultSet rs = null;
%>
<body>
<%--<%
IBookInfo book = new BookInfoImple();
String[] values = request.getParameterValues("checkbox");
String temp = null;
for(int i=0;i<values.length;i++){
temp = values[i];
StringBuffer sb = new StringBuffer(temp.length());
for(int k=0;k<temp.length()-1;k++){
char ch = temp.charAt(k);
if(ch=='/'){
temp = temp.replace('/',' ');
String[] s = temp.split(" ");
for(int j=0;j<s.length;j++){
temp = sb.append(s[j]).toString();
}
}
}
//book.queryByName(temp);
//Integer in = new Integer(temp);
//int id = in.intValue();
rs = book.queryById(new Integer(temp));
//session.setAttribute("rs",rs);
//response.sendRedirect("buy.jsp");
%>
--%><form id="form1" name="form1" method="post" action="orderConfirm.jsp">
<p align="center" class="STYLE1">我的购物车</p>
<hr />
<table width="694" border="1" align="center">
<tr>
<th width="168" scope="col"><span class="STYLE2"> 数量</span></th>
<th width="50" scope="col"><div align="center"><span class="STYLE2">索引</span></div></th>
<th width="88" scope="col"><div align="center"><span class="STYLE2">书名</span></div></th>
<th width="71" scope="col"><div align="center"><span class="STYLE2">定价</span></div></th>
<th width="70" scope="col"><div align="center"><span class="STYLE2">作者</span></div></th>
<th width="78" scope="col"><div align="center"><span class="STYLE2">出版日期</span></div></th>
<th width="123" scope="col"><div align="center"><span class="STYLE2">出版社</span></div></th>
</tr>
<%
IBookInfo book = new BookInfoImple();
String[] values = request.getParameterValues("checkbox");
String temp = null;
for(int i=0;i<values.length;i++){
temp = values[i];
StringBuffer sb = new StringBuffer(temp.length());
for(int k=0;k<temp.length()-1;k++){
char ch = temp.charAt(k);
if(ch=='/'){
temp = temp.replace('/',' ');
String[] s = temp.split(" ");
for(int j=0;j<s.length;j++){
temp = sb.append(s[j]).toString();
}
}
}
//book.queryByName(temp);
//Integer in = new Integer(temp);
//int id = in.intValue();
rs = book.queryById(new Integer(temp));
session.setAttribute("rs",rs);
//response.sendRedirect("buy.jsp");
%>
<%while(rs.next()){%>
<tr>
<td height="29"><div align="center">
<input name="textfield" type="text" />
</div></td>
<td><%=rs.getInt("id")%></td>
<td><%=rs.getString("name")%></td>
<td><%=rs.getInt("price")%></td>
<td><%=rs.getString("author")%></td>
<td><%=rs.getString("date")%></td>
<td><%=rs.getString("bookman")%></td>
</tr>
<% }%>
<%} %>
</table>
<p align="center" class="STYLE1">
<input type="submit" name="Submit" value="确定购买" />
<input type="reset" name="Submit2" value="取消" />
</p>
<p align="center" class="STYLE3"><a href="index.jsp">首页</a> <a href="bookOnLine.jsp">返回</a></p>
<p> </p>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -