This article mainly shares the notes on the basic javascript syntax to help you consolidate the basic javascript knowledge. For more information, see
I. Definition
Javascript is a scripting language (interpreted Programming Language) used to enhance the dynamic page effect and realize real-time and dynamic interaction between pages and users ). Javascript consists of three parts: ECMA, DOM, and BOM.
[1] ECMAScript is defined by ECMA-262 and provides core language functions (ECMA is the European Association of computer manufacturers)
[2] DOM Document Object Model, which provides interfaces for accessing and operating webpage content
[3] BOM browser object model, which provides interfaces for interacting with browsers
II. Introduction
There are two ways to introduce javascript: embedding js code in the page and introducing external files
[1] Page embedding
《script》 alert("My First JavaScript");《script》
[2] introducing external js files
[Note] the script element with the src attribute should not include additional js Code between its script tag. If the embedded code is included, only the external scripts are downloaded and executed, while the embedded code is ignored.