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--%>
格式如下:<%--內容--%>
3. java注釋
只能出現在Java代碼區中,不允許直接出現在頁面中。//單行注釋 /*多行注釋*/
|
新聞熱點
疑難解答