20170622的代码
来源:互联网 发布:脑卒中危险因素知多少 编辑:程序博客网 时间:2024/06/03 23:43
-----------------------------------------------------show.jsp-----------------------------------------------------
<%@page import="java.util.ArrayList"%>
<%@page import="com.ntqn.stduent.Student"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://www.ntqingniao.com/core/c"%>
<!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=UTF-8">
<title></title>
<style>
#t1{
border: 1px black solid;
border-collapse:collapse;
}
#t1 tr{
border: 1px black solid;
border-collapse:collapse;
}
#t1 tr:NTH-CHILD(even){
background-color: rgba(122,122,122,0.2);
}
#t1 tr:NTH-CHILD(odd){
background-color: rgba(200,23,23,0.2);
}
#t1 tr>td{
height:30px;
border: 1px black solid;
border-collapse:collapse;
line-height: 30px;
font-size: 18px;
text-align: center;
}
</style>
</head>
<script src="../assent/js/jquery-3.2.1.min.js"></script>
<body>
<form action="/studentManager/StudentServlet.do" method="get">
<p><span>请输入学生姓名:</span><input type="text" id="input1" name="name"/> <input type="submit" value="搜索"/></p>
</form>
<table id="t1">
<thead>
<tr style="background-color: white;">
<th>姓名</th>
<th>学号</th>
<th>性别</th>
<th>班级</th>
<th>爱好</th>
<th>邮箱</th>
<th>个人介绍</th>
</tr>
</thead>
<tbody>
<c:forEach items="${stus }" var="student">
<tr>
<td>${student.name }</td>
<td>${student.code }</td>
<td>${student.sex ==1 ? '男':'女' }</td>
<td>${student.clazz }</td>
<td>${student.habit }</td>
<td>${student.email }</td>
<td>${student.introduce }</td>
</tr>
</c:forEach>
</tbody>
</table>
</body>
</html>
-----------------------------------------------------stduentService.java---------------------------------------
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
List<Student> stus = new ArrayList<Student>();
String name = (String)request.getParameter("name");
try {
stus = new StudentImplement().findByName(name);
} catch (Exception e) {
e.printStackTrace();
}
request.setAttribute("stus", stus);
request.getRequestDispatcher("/view/show.jsp").forward(request, response);
}
- 20170622的代码
- 运行代码的代码
- 运行代码的代码
- 什么是代码后面的代码
- JS:运行代码的代码
- 好的代码:傻瓜型代码
- 代码框 的代码
- 网页,运行代码,复制代码,代码另存的代码
- 优秀的代码 vs. 糟糕的代码
- 优秀的代码 vs. 糟糕的代码
- 什么样的代码是合格的代码
- 优秀的代码VS糟糕的代码
- 代码维护:改进代码的一些方法
- javascript 运行代码的代码 By Stabx
- 代码点和代码单元的关系
- 一段输出代码本身的SQL代码
- 分页的页面代码和后台代码
- 在线运行代码框的代码
- ajaxfileupload同一个文件只能上传一次问题解决
- webcollector爬虫框架使用案例
- mysql 受影响行数,记录ID,存储过程查询
- MyBatis传入参数为list、数组、map写法
- 机器学习20-线性支持向量机svm公式推导(二)
- 20170622的代码
- android中的EditText怎么屏蔽软键盘以及在屏蔽软键盘弹出其它对像
- 解决IE浏览器下上传文件返回Json数据提示下载的问题。
- 正则表达式学习
- TCP连接状态详解及TIME_WAIT过多的解决方法
- CRC校验
- Hibernate相关笔记
- CSS之Background-clip属性
- Codeforces 469D Two Sets 题解