JS is a scripting language that runs on a browser and is a scripting language that is applied to client Web development.
The core of JS is very concise and contains two parts: basic grammatical constructs (operators, control structures, statements) and standard libraries (objects with various functions such as array, Date, math, etc.)
The complete JS consists of three parts:
1, the core of JavaScript (ECMAScript)
2. Document Object Model (dom,document)
3. Browser object Model (BOM Browser object models)
Dom is part of the BOM
Dom-->document-->window
Bom-->window
JS Features: No compilation, interpreted by the JavaScript engine, is a weakly typed language, is Object-based.
JS three ways to quote:
1. In the HTML element event, execute the JS event:
<button onclick = "Console.log (' executed click event ')" > button </button>
2, using the script element, the general script tag placed in the head: The JS code directly placed in the script tag, JS code is executed sequentially;
<script type= "Text/javascript" > console.log (' executed event 2 '); </script>
3, JS external reference script file, the introduction of an external JS file;
<script src= "Ej1.js" ></script>
JS Introduction and use