JSP评论被称为隐藏评论,而HTML评论被称为输出评论 [英] JSP comment is called hide comment whereas html comment is called output comment

查看:166
本文介绍了JSP评论被称为隐藏评论,而HTML评论被称为输出评论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在准备面试,所以在阅读一些问题时,我发现JSP评论被称为隐藏评论,而HTML评论被称为输出评论。答案是,如果我们试图在JSP中查看源代码,评论将不会显示,而在HTML中,它将显示。

I'm preparing for an interview so while reading some questions I found that the "JSP comment is called hide comment whereas html comment is called output comment". And the answer says that if we try to view source in JSP, the comments will not be shown whereas in HTML, it will be shown.

但是我可以请参阅查看源代码部分的评论。
任何人都可以清除这个疑问吗?

But I'm able to see the comment in the view source section. Can anybody clear this doubt?

在此先感谢您。

Thanks in advance.

推荐答案

在JSP中允许有两种类型的注释。这些是隐藏和输出的评论。隐藏的评论不会出现在html中生成的输出中,而输出评论会出现在生成的输出中。

There are two types of comments are allowed in the JSP. These are hidden and output comments. A hidden comments does not appear in the generated output in the html, while output comments appear in the generated output.

隐藏评论的示例:

<%-- This is hidden comment --%>

输出评论示例:

<!-- This is output comment -->

这篇关于JSP评论被称为隐藏评论,而HTML评论被称为输出评论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆