Ready to re-complete the further study of JavaScript, mainly pay attention to some common problems, less nonsense.
1. Add the <script> tag, which will have two forms:
<= "Text/javascript"></script> < = "JavaScript" > </script >
One of the second forms is not recommended for use.
2. When <frameset> is used, the JavaScript code cannot execute inside it and must be placed outside it.
<Scripttype= "Text/javascript">Alert ("OK") ; //can perform </Script> <Framesetrows= "50%, *"> <Scripttype= "Text/javascript">Alert ("NO") ; //cannot execute </Script> </Frameset>
3. Data type:
A. Value type (base type)
numeric type, String type, Boolean type
B. Reference types
View the type of definition,
typeof variable Name,
<= "Text/javascript"> var=10 ; document.write (typeof tmp); </ Script >
4. The parameters in the function do not write the type (this is used to C + +, etc. people are prone to error)
Function Plus (Var a, var b) {...} Error function Plus (A, b) {...} That's right
JavaScript Learning notes (i)