Core tips: JavaScript, which provides scripting languages, is very similar to C + +, except that it removes easily-generated errors such as pointers in C and provides a powerful class library. For people who already have C + + or C, learning the JavaScript scripting language is a very relaxing thing to do.
JavaScript BASIC data structure
JavaScript, which provides scripting languages, is very similar to C + +, except that it removes easily-generated errors such as pointers in C and provides a powerful class library. For people who already have C + + or C, learning the JavaScript scripting language is a very relaxing thing to do.
One, the addition of JavaScript code
JavaScript scripts are included in HTML, which becomes part of the HTML document. Combined with the HTML logo, it forms a powerful Internet programming language. You can add JavaScript scripts directly to the document:
Description
By identifying <Script>...</Script> indicating JavaScript script source code will be placed in the meantime.
by attribute language = "JavaScript" describes what language is used in the identity, and this is the JavaScript language, which represents the language used in JavaScript.
Here's an example of adding JavaScript script to a Web document:
<ptml> <br/><pead> <br/><body> <br/><script Language = "JavaScript" > <br />document.write ("Welcome to Web Production Tutorial web!"); <br/>document.close (); <br/></Script> <br/></body> <br/></pead> <br/></ptml>
Test2.html
Call test2.html in the browser's window.
Description
Document. Write () is the output function of the document object that prints the character or variable value in parentheses to the window; Close () closes the output.
The logo <Script>...</Script> can be put into <head> ... </Head> or <Body> ... </ Between Body> . Place the JavaScript identity between the head to load the home page and the rest of the code to make the code more powerful; You can place the JavaScript identity in the body <body>. </Body> to implement some parts of the dynamic creation of a document.
-->