日期:2014-05-17 浏览次数:20724 次
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="entity.StudentInfo, dao.StudentDao" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'index.jsp' starting page</title>
<link rel="stylesheet" type="text/css" href="styles.css">
<style type="text/css">
.table{width: 700px;
text-align:center;
}
.td1{text-align: center;
font-size: 20px;
font-weight: bold;
}
</style>
</head>
<script type="text/javascript">
</script>
<body>
<form method="post" name="student">
<table border="1" class="table">
<tr height="80px">
<td class="td1" colspan="6">学员信息列表</td>
</tr>
<tr>
<td>学员编号</td>
<td>学员姓名</td>
<td>学员性别</td>
<td>学员年龄</td>
<td>家庭住址</td>
<td>Email</td>
</tr>
<c:forEach var="list" items="${list}" varStatus="status" >
<tr <c:if test="${status.index%2==1 }">
style="background-color:red;"
</c:if>>
<td><a href="login.do?sid=2">${list.sid}</a></td>
<td>${list.sname}</td>
<td>${list.sgender}</td>
<td>${list.sage}</td>
<td>${list.saddress}</td>
<td>${list.semail}</td>
</tr>
</c:forEach>
</table>
</form>
</body>
</html>
package servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;