javascript syntax specification

<! DOCTYPE HTML the PUBLIC "- // the W3C // DTD HTML 4.01 Transitional // EN" 
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<head>
<title> JavaScript </ title>

</ head>
<body>
<P> Star </ P>
<Script>
/ * 1. in line defines a plurality of variable
var A =. 1, B = 2;
* /
. // NOTE 2 single row / / multi-line comments / * * /
// var. 1 = a; // variables defined separately, if not var, for the global variable is a variable
// var B = 2;
// Alert (a)
// Alert ( B)

var = S 'star456';
var = F '8.88';
/ * see the results on the command line. 3 * /
the console.log (S);
the console.log (F);
/ * use document.write view the results. 4. * /
document.write (S);
document.write(f);


</script>

</body>
</html>

Guess you like

Origin www.cnblogs.com/startl/p/12227454.html
Recommended