Introduction to JavaScript
definition : JavaScript is a scripting language, requires a host file, and its host file is an HTML file.
JavaScript is a lightweight programming language.
JavaScript is a programming code that can be inserted into an HTML page.
JavaScript is inserted into an HTML page and can be executed by all modern browsers.
Second, use :
There are three blocks in the HTML position:
1) head inside;
2) body inside;
3 after
1. Write HTML output
2. Responding to Events
3, find the elements, change the content/style
4. Define variable groups--equivalent to a struct in C # (a set of variables)
<script> code can be written in
5, how to call the external JS
Use "File"--new "JavaScript"--"create". Write operations, functions, and so on in the new "JavaScript" by calling in HTML.
Format: <script src= "path. JS "></script>
Create a new file with JS suffix on the outside.
Referencing external JS in host file html