Usage of 1.JS
In HTML, his position is three places, after Head,body and
<script type= "Text/javascript" > code written on the inside </script>.
2. Three common dialog boxes
Alert ("") alert box, the function is to pop up a warning box
Confirm ("") Select the dialog box, the function is to pop up a selection dialog Click OK to return True, click Cancel to return to Flase.
Prompt ("", "") Pop up a dialog box that can input content, the first quotation mark inside the hint text to display, the second inside the input box and the contents of the hint (such as).
Syntax for 3.js
1 Basic data types are: String, Decimal, Integer, DateTime, Boolean, etc.
2 generally has a generic type of Var, which can store other types at will. You can use it to define variable var a=
3 Type conversions: There are casts and automatic conversions, which are generally cast.
Integer type parseint ()
Decimal Type parsefloat ()
In addition, there are character atring, double-precision doubles, single-precision flot, etc.
4 Judging is not a valid number type IsNaN ()
5 operator
Math operator +,-, *,/,++,--
Relational operator = =,!, >=,<=>,=
Logical operator &&,| |,!
Other operators +=,-+,*=,/=,%,? (A+=b equals A=a+b)
Day6 JS (JavaScript)