JS is a scripting language that requires a host file, which is the carrier-html file.
1. js Annotation Method:/*...*/multi-line annotation; //.... Single-line Comment
Example:/* Comment content */;//comment content
2. The location of JavaScript in HTML can be in the head, in the body, or after
3. Common dialog: Alert ("") box only OK option
Confirm ("") bullet box with OK and cancel options
Prompt ("") bullet box has OK, cancel, and input box
4. Data type: integer int, float float, char char, String type, decimal type Double/decimal, Object type, Boolean bool{true,false}, Date type DateTime, Currency type Money
Type conversions are normally cast parseint,parsefloat
5. Strongly typed language: C,c+,java; define assignment mode |int a|
Weakly typed language: js,php; Define assignment mode |var A; A=10, or var a = 10;
Need to define re-assignment first
6. Operators:
Math operator: +,-, *,/,%
Comparison operators: = = equals,! = Not equal to, >,<,>=,<=
Other: + can be used for concatenation of strings; ternary operator: A==b? " A ":" B ";
Java Journey-js A