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
廣告