YouTip LogoYouTip

Met Document Createcomment

# HTML DOM createComment() Method [![Image 8: Document Object Reference Manual](#) Document Object](#) ## Example Can create a comment node and insert it into the HTML document: var c=document.createComment("My personal comments"); document.body.appendChild(c); Output: [Try it Β»](#) * * * ## Definition and Usage The createComment() method creates a Comment node. * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) The createComment() method is supported by all major browsers. * * * ## Syntax document.createComment(_text_) ## Parameters | Parameter | Type | Description | | --- | --- | --- | | _text_ | String | Optional. The text for the comment. | ## Return Value | Type | Description | | --- | --- | | Comment object | The created Comment node | ## Technical Details | DOM Version | Core Level 1 Document Object | | --- | * * Document Object](#)
← Met Doc OpenMet Document Createattribute β†’