JSP的2种注释方式

来源:互联网 发布:csol剑伤害数据 编辑:程序博客网 时间:2024/06/11 03:26

1.      HTML注释(输出注释):

指在客户端查看源代码时能看见注释。例如,

<!-- this is an html comment.it will show up int theresponse. -->

格式如下:<!--   内容—>

2.      JSP页注释(隐藏注释):可以跨行

指注释虽然写在JSP程序中,但不会发送给客户,因此在客户端查看源代码时不能看见注释。这样的注释在JSP编译时被忽略掉。

<%--this is a JSP comment.it will only be seen in jspcode--%>

格式如下:<%--内容--%>


0 0
原创粉丝点击