📄 search.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="search" 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>
</head>
<body>
<%
request.setCharacterEncoding("GBK");
int brand_id=Integer.parseInt(request.getParameter("brand"));
String type=request.getParameter("type");
String str="select car_id from car where brand_id="+brand_id+" and type='"+type+"'";
String str1="select car_id from ";
ResultSet rs=null;
search.open();
rs=search.executeQuery(str);
if(rs!=null)
{
if(rs.next())
{
response.sendRedirect("CarInfo.jsp?car_id="+rs.getInt(1));
}
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -