Comment / コメント / 注釈
コメントです。一行だけのコメントは//で、複数行に渡るコメントは/*と*/で囲みます。Windows版のInternet Explorerではコメント内に日本語が含まれると正しく処理されずエラーとなることがありますので注意が必要です。
構文
// コメント /* 複数行に渡るコメント */
例文
<html> <head> <title>Comment / コメント / 注釈</title> </head> <body> <script type="text/javascript"><!-- document.write("Sample"); // document.write("JavaScript"); /* document.write("Text"); alert("OK?"); */ // --></script> </body> </html>
関連記事
- with
- while
- var
- try
- throw
- this
- switch
- return
- new
- if
- function
- finally
- else
- do
- delete
- default
- continue
- const
- catch
- case
- break
スポンサーリンク