JavaScript Tutorial/Language Basics/Comments

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

Hide scripts using comments

   <source lang="javascript">

<html> <head> <title>Hide scripts using comments.</title> <script language="javascript" type="text/javascript">

</script> </head> <body> Page content here... </body> </html></source>


Multiline comments

/* */ enables comments to span multiple lines.



   <source lang="javascript">

<html> <head> <title>A Simple Page</title> <script language="javascript">

</script> </head> <body> </body> </html></source>


Single line comments

The // comment tag enables comments to be placed between the // and the end of the line.



   <source lang="javascript">

<html> <head> <title>A Simple Page</title> <script language="javascript">

</script> </head> <body> </body> </html></source>