createComment

HTML (DHTML)

createComment Method

Internet Development Index

Creates a comment object with the specified data.

Syntax

oComment = document.createComment(sData)

Parameters

sData Required. String that sets the comment object's data.

Return Value

Returns a reference to the new comment object.

Standards Information

This method is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

document