什么是JSP评论?
JSP注释标记了JSP容器应忽略的文本或语句。当您想隐藏或“注释掉”JSP页面的一部分时,JSP注释非常有用。
以下是JSP注释的语法-
<%-- This is JSP comment --%>
以下示例显示了JSP注释-
<html>
<head>
<title>A Comment Test</title>
</head>
<body>
<h2>A Test of Comments</h2>
<%-- This comment will not be visible in the page source --%>
</body>
</html>上面的代码将产生以下结果-
A Test of Comments