📄 shangpin.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>查看会员资料</title>
<style type="text/css">
<!--
body {
background-image: url(image/b096.gif);
}
body,td,th {
font-size: 14px;
}
.style16 {
color: #0099CC;
font-weight: bold;
}
.style17 {font-size: 14px}
-->
</style></head>
<body background="image/b096.gif">
<div align="center">
<table width="760" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="760" height="30" align="left"> </p>
<table width="573" border="1" cellpadding="0" cellspacing="0" bordercolor="#C6D8E7">
<tr bgcolor="#E3E4E8" class="style16">
<td width="47" height="30"><span class="style16"><font color="#CC99FF">商品ID</font></span></td>
<td width="67" class="style16"><font color="#CC99FF">商品名称</font></td>
<td width="74" class="style16"><font color="#CC99FF">详细信息</font></td>
<td width="47"><font color="#CC99FF">市场价</font></td>
<td width="67"><font color="#CC99FF">会员价</font></td>
<td width="61"><font color="#CC99FF">图片</font></td>
<td width="70"><font color="#CC99FF">商品类别</font></td>
<td width="63"><font color="#CC99FF">是否删除</font></td>
</tr>
<%String sql="select * from shop";
ResultSet rs=null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");//加载JDBC驱动程序
}
catch(java.lang.ClassNotFoundException e)
{
System.err.println("database:"+e.getMessage());
out.println("驱动没有加载");
}
try
{
Connection conn=DriverManager.getConnection("jdbc:odbc:zhuce"," "," ");
Statement stmt=conn.createStatement();
rs=stmt.executeQuery(sql);
while(rs.next())
{String product_id=rs.getString(1);
%>
<tr>
<td height="25"><%=product_id%></td>
<td><%=rs.getString(2)%></td>
<td><%=rs.getString(3)%></td>
<td><%=rs.getString(4)%></td>
<td><%=rs.getString(5)%></td>
<td><img src="<%=rs.getString(6)%>" width="90" height="90"></td>
<td><%=rs.getString(7)%></td>
<td><a href="dele3.jsp?product_id=<%=product_id%>">删除</a></td>
</tr>
<%} stmt.close();
conn.close();}
catch(SQLException e)
{
System.err.println("executeQuery:"+e.getMessage());
out.println("数据没有写入");
}
%>
</table>
<div align="center"></div>
</td>
</tr>
<tr>
<td height="12" align="center"><p align="center" class="style12"><a href="guanliyuan.htm" class="style17">返回首页</a></p></td>
</tr>
<tr>
<td height="27" align="center"><hr size="1" class="style12">
<p align="center" class="style12"> </p></td>
</tr>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -