First of all, it is the most recent course arrangement:
JS basic Syntax →bom→dom→dom style sheet →js event →js form → regular expression;
Here's what you'll learn today:
First, the introduction of JS
JS is a weakly-typed interpretation language that uses var to define variables. JS to run in a Web environment, and Java can be used on any platform
Second, the original data type JS
- Undefined: undefined type and value, no return value
- Null: Represents an object that does not exist
- Boolean: Only 2 values of true and False
- Number: Numeric, can represent 32-bit integers and 64-bit floating-point numbers
- String: Character type
Iii. Types of conversions
- Boolean (value): Converts the given value to a Boolean type
- Number (value): Converts the given value to a digital type
- String (value): Converts the given value to a string type
- parseint (value): Converts the given value to an integer number
- Parsefloat (value): Converts the given value to a floating-point type
Iv. native Objects
- Array: Create an array in JS
var arr = new Array (value);
2. Date: Current system time
GetMonth is from 0月-November;
3. encodeURI () encoding; decodeURI decoding
Five, function: a set of statements that can be run anywhere, is the core of JS
Function name (parameter) {statement}
July 14: JS's basic syntax