📄 carmodify.jsp
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=gb2312"
pageEncoding="gb2312" import="java.sql.*"%>
<jsp:useBean id="mody" class="Bean.DbConn" scope="page"/>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {
font-size: 36px;
font-weight: bold;
color: #99CC66;
}
.STYLE2 {
font-size: 12px;
font-weight: bold;
}
-->
</style>
</head>
<body>
<%
request.setCharacterEncoding("GBK");
ResultSet rs=null;
String type="";
String prodtime="";
String browseNum="";
String price="";
String introduction="";
String cover="";
String commend="";
int carId=Integer.parseInt(request.getParameter("car_id"));
String strSql="select * from car where car_id="+carId;
session.setAttribute("car_id",request.getParameter("car_id"));
//out.print((String)session.getAttribute("car_id"));
mody.open();
rs=mody.executeQuery(strSql);
if(rs.next())
{
type=rs.getString("type");
price=rs.getString("price");
prodtime=rs.getString("prodtime");
browseNum=rs.getString("browse_num");
cover=rs.getString("cover");
introduction=rs.getString("introduction");
commend=rs.getString("commend");
//out.print(commend);
}
%>
<form action="carModifySubmit.jsp" method="post">
<div align="center" class="STYLE1">修改汽车信息 </div>
<table width="556" border="1" align="center" bgcolor="#CCCCCC">
<tr>
<td width="68"><span class="STYLE2">汽车型号</span></td>
<td width="329"><input type="text" name="type" value="<%=type%>"></td>
</tr>
<tr>
<td><span class="STYLE2">上市时间</span></td>
<td><input type="text" name="prodtime" value="<%=prodtime%>"></td>
</tr>
<tr>
<td><span class="STYLE2">浏览次数</span></td>
<td><input type="text" name="browse_num" value="<%=browseNum%>"></td>
</tr>
<tr>
<td><span class="STYLE2">厂家报价</span></td>
<td><input type="text" name="price" value="<%=price%>"></td>
</tr>
<tr>
<td><span class="STYLE2">图片名称</span></td>
<td><input type="text" name="cover" value="<%=cover%>"></td>
</tr>
<tr>
<td><span class="STYLE2">推荐</span></td>
<%/*
if(commend=="是")
//out.print("111");
//out.print("<td><input type='checkbox' name='commend' value='是' checked='checked'></td>");
else
//out.print("<td><input type='checkbox' name='commend' value='否'></td>");
out.print("111");*/
%>
<td><input type="radio" name="commend" value="是" checked="checked">是<input type="radio" name="commend" value="否">否</td>
</tr>
<tr>
<td><span class="STYLE2">汽车简介</span></td>
<td><textarea name="introduction" rows="10" cols="60"><%=introduction%></textarea></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" value="保存修改"></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -