1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <MetaCharSet= "UTF-8">5 <title></title>6 <Scripttype= "Text/javascript">7 8 /*9 Multi-line commentsTen JS Comment One multiple lines of comment, the content in the comment is not executed, but can be viewed in the source code A to develop a good habit of writing annotations, you can also use annotations to do some simple debugging of your code. - */ - the //single-line comment - //alert ("Hello"); - //document.write ("Hello"); - Console.log ("Hello"); //This statement is used to output a log in the console + - /* + * Strict case sensitivity in 1.JS A * Each statement in 2.JS ends with a semicolon (;) at *-If you do not write a semicolon, the browser will automatically add, but will consume some system resources, and sometimes, the browser will add the wrong semicolon, so in the development of the semicolon must write - * Multiple spaces and line breaks are ignored in 3.JS, so we can format the code with spaces and line breaks - * - */ - - Alert ("Hello"); in - to + </Script> - </Head> the <Body> * $ </Body>Panax Notoginseng </HTML>
JS Basics _ Basic Syntax