Home  >  Article  >  Web Front-end  >  JSP 中的几种注释_html/css_WEB-ITnose

JSP 中的几种注释_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:34:191389browse

1、多行注释

1     <!-- 注释12 3         注释2 注释34 5         -->

    或者

1     <!-- 注释12 3         ……4 5     注释n6 7     //-->

 

2、多行注释,不同的是:注释内容不会发送到客户端,会被JSP引擎所忽略

1     <%-- 这里的内容不会被发送到客户端2 3     --%>

 

3、单行注释

1     // 注释当前行

 

 

a、引用,一般在jsp中的开头使用,如

1     <%@ page import="java.lang.util.Date" %>

 

b、嵌套Java代码,如

1    <%  Date now = new Date(); %>

 

 

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn