HTML

1个成员

HTML元素 - comment

发表于 2017-02-13 3780 次查看

定义

表示不可见的注释。防止所包含的文本或者HTML源代码被浏览器解析和显示。

Indicates a comment that is not displayed. Prevents any enclosed text or HTML source code from being parsed and displayed in the browser window.

注释

COMMENT 元素将被看作无范围的元素也不含任何子对象。

此元素在 Internet Explorer 3.0 及以上版本的 HTML 中可用,在 Internet Explorer 4.0 及以上版本的脚本中可用。

在 Internet Explorer 6 中可用的 comment.length 属性,将返回对象中的字符数。

此元素不改变显示。

此元素需要关闭标签。

此元素可以包含其它HTML元素。此元素不能嵌套使用。

The COMMENT element is treated as a no-scope element and does not expose any children.

This element is available in HTML as of Internet Explorer 3.0, and in script as of Internet Explorer 4.0.

The comment.length property, available as of Internet Explorer 6, returns the number of characters in the object.

This element is not rendered.

This element requires a closing tag.

Comments can contain other HTML elements. Comments do not nest.

示例代码

<!-- This text will not appear in the browser window. -->
发表回复
你还没有登录,请先登录注册