The following are the JavaScript self-study notes I compiled for you. Interested students can take a look.
Chapter 1
1. Overview of JavaScript
JavaScript is an object- and event-driven scripting language, mainly used on the client side.
Features:
1. Interactivity (all it can do is dynamic interaction of information)
2. Security (it does not allow direct access to the local hard disk)
3. Cross-platform (as long as it is Any browser that can interpret JS can execute it, regardless of the platform).
2. The difference between JavaScript and Java
1. JS is a product of Netscape Company, formerly LiveScript, Java is a product of Sun Company, and now it is a product of Oracle Company.
2.JS is an object- and event-based language, and Java is an object-oriented language.
3.JS is a weakly typed language, and Java is a strongly typed language.
4.JS does not require compilation to run. It can be run directly. Java needs to be compiled into a class bytecode file before it can be run.
3. JavaScript and JScript
The former is from Netscape and the latter is from Microsoft. There are some differences between the two.
Currently on the market The browser has the best support for JavaScript.
In order to unify the standards, an ECMA specification was released to unify the two standards.
4. The way to combine JavaScript with HTML
1. Encapsulate javascript code into