A common table unit is known as:
TextBox (Text),
Password box (password),
Multiline text box (<textarea>)
Radio button (radio),
check box (checkbox),
list box (<select> and <option>)
Buttons (button, submit, and reset)
Second, why to learn JavaScript
1. Form verification-Reduce server-side pressure
2. Page dynamic effects
3. Dynamically change page content
What are the components of JavaScript?
Made up of Ecmascript,dom (Document Object model), BOM (Browser object model)
IV. basic structure of JavaScript scripts
<script type= "Text/javascript" >
<!--JavaScript statements; -
</script >
V. Declaration and assignment of JavaScript variables
1. Declare the variable to be re-assigned (var width; width = 5)
2. Simultaneous declaration and assignment variable (var catname= "Leather";)
3. Do not declare direct assignment (width=5)
Vi. data type typeof The return value of the detection variable
Undefined Boolean string number null
The return value of the typeof operator is as follows:
undefined: The variable is declared but not assigned
string: A character literal that is declared in single or double quotation marks
Boolean: True or False
number: integer or floating-point number
object: Objects, arrays, and Null in JavaScript
Seven, operational symbols
1. Arithmetic operators (+,-,*,/,%,++,--)
2. Assignment operator (=,==)
3. Comparison operator (> < >= <= = = =)
4. Logical operators (&& | | !)
Viii. notes
1. Single-line comments start with // , end at end of line,
2. Multi-line comments start with/ * , End with * /, sign/ * ... * /indication
Nine, common input/output
Alert ()
Alert ("hint message");//Popup window hint
Input box hint
Prompt () prompt ("Prompt information", "Default information for Input box");
Prompt ("Please enter name", "Zhang San"); Prompt ("Please enter name");
Basic syntax for JavaScript (i)