JavaScript Reference/Javascript Methods/createComment

Материал из Web эксперт
Версия от 11:22, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"createComment()" Example

   <source lang="javascript">
   

<html> <body> Body content. <script language="JavaScript">

   document.createComment("This is the comment text");

</script> </body> </html>


     </source>
   
  


"createComment()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |document | +----------------+--------------------------------------------------------------+

     </source>
   
  


"createComment()" Syntax, Parameters and Note

   <source lang="javascript">

Note: This method creates a <comment> element.

Syntax:

document.createComment(param1)

Parameters:

   param1   Required; the text of the comment.
   
     
     </source>