根据状态这个字段 的返回状态来判断 是 显示 修改还是 批准出院
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
Created by IntelliJ IDEA.
User: user
Date: 2022/8/18
Time: 18:25
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>展示页面</title>
</head>
<body>
${slist}<br>
<center>
<h1>患者信息表</h1><br>
<form action="FindAllServlet" method="post">
<input type="text" name="pname" placeholder="根据患者姓名模糊查询">
<input type="submit" value="搜索">
</form>
<table border="2px" cellspacing="0px">
<tr>
<th>床号</th>
<th>患者姓名</th>
<th>患者籍贯</th>
<th>联系电话</th>
<th>入院时间</th>
<th>所在科室</th>
<th>状态</th>
<th>操作</th>
</tr>
<c:forEach items="${slist}" var="s">
<tr>
<th>${s.pid}</th>
<th>${s.pname}</th>
<th>${s.place}</th>
<th>${s.number}</th>
<th>${s.times}</th>
<th>${s.office}</th>
<th>
${s.type==0?"未出院":""}
${s.type==1?"已出院":""}
</th>
<th>
${s.type==0}
<a href="FindByIdServlet?pid=${s.pid}">修改</a>
</th>
</tr>
</c:forEach>
</table>
</center>
<script>
function fa(s) {
var a = "<a.href=''>批准出院</a>"
if (s==0){
} else {
}
}
</script>
</body>
</html>