JSP基本语法
JSP注释
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/dda30abe3930527f1cef0c19f67223be.png)
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>JSP注释例子</title>
</head>
<body>
<!-- 该JSP注释可以在浏览器文件中看到 -->
<br/>
<center>
<table>
<tr>
<th>
<b>JSP注释</b>
</th>
</tr>
</table>
</center>
<table>
<tr>
<th>
<b>JSP注释</b>
</th>
</tr>
</table>
<table align="right">
<tr>
<th>
<b>JSP注释</b>
</th>
</tr>
</table>
<%--该JSP注释无法在浏览器中看到 --%>
<%
%>
</body>
</html>
运行结果:
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/e88a669f1c52078c2537b5670e9fcde5.png)
浏览器文件:
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/eb9a18edd9f97093fc0da3a5ea4530fc.png)
解释:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>JSP注释例子</title>
</head>
<body>
<!-- 该JSP注释可以在浏览器文件中看到 -->
<br/><<!-- 换行 -->
<center><!-- 文本居中 -->
<table><!-- 表格 -->
<tr><!-- 表格行 -->
<th><!-- 表头 -->
<b>JSP注释</b>
</th>
</tr>
</table>
</center>
<table>
<tr>
<th>
<b>JSP注释</b>
</th>
</tr>
</table>
<table align="right">
<tr>
<th>
<b>JSP注释</b>
</th>
</tr>
</table>
<%--该JSP注释无法在浏览器中看到 --%>
<%
%>
</body>
</html>