网页显示特殊字符
打开网页发现多个几个 “>”,请问什么原因产生的,该如何消除呢<%@ page contentType="text/html;charset=UTF-8" language="java" %><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<input type="button" value="新增" id="add">
<hr>
<table border="1" cellspacing="0" width="80%">
<tr>
<th>序号</th>
<th>品牌名称</th>
<th>企业名称</th>
<th>排序</th>
<th>品牌介绍</th>
<th>状态</th>
<th>操作</th>
</tr>
<c:forEach items="${brands}" var="brand" varStatus="status">
<tr align="center">
<%--<td>${brand.id}</td>--%>
<td>${status.count}</td>
<td>${brand.brandName}</td>
<td>${brand.companyName}</td>
<td>${brand.ordered}</td>
<td>${brand.description}</td>
<td>${brand.status == 1 ? "启用":"禁用"}</td>>
<td><a href="/brand-app/selectByIdServlet?id=${brand.id}">修改</a> <a href="#">删除</a></td>
</tr>
</c:forEach>
</table>
<script>
document.getElementById("add").onclick = function () {
location.href = "/brand-app/addBrand.jsp";
}
</script>
</body>
</html> 转义符
https://wenku.baidu.com/view/bdf645733f1ec5da50e2524de518964bce84d270.html 楼上说得对
<td>${brand.status == 1 ? "启用":"禁用"}</td>>
这一行多了一个 >,每次add 添加数据时都会多打印一个
页:
[1]