Javascript
key points of knowledge carding
one. Javascript Process Control
- The data types commonly used in JS
- Use of the VAR keyword
- If–else If–else
- Switch
- While
- For
two. Javascript Common Functions
- 1. String Functions
- Substring
- IndexOf
- LastIndexOf
- CharAt
- Replace
- Split
- toLowerCase
- toUpperCase
- 2. Mathematical arithmetic functions
- Math.Abs
- Math.ceil
- Math.floor
- Math.Round
- Math.pow
- Math.random
- 3. data type conversion Functions
- parseint
- Parsefloat
three. Javascript dialog Box
- Alert Prompt dialog box
- Confirm Confirmation Dialog box
- Prompt Input dialog box
four. Javascript built-in objects
- 1. Array objects (one-dimensional arrays only)
- Length property: Gets the size of the array
- Push function: Adds an element to the end of an array
- Pop function: Remove the trailing elements of an array from the array
- Slice function: Extracts a specified number of elements starting at the specified position in the array
- Sort method: Sorts the elements in the array by default
- Reverse function: Invert the elements in an array
- Join function: Concatenate all elements of an array into a string using the specified delimiter
- 1. Time Objects
- toLocaleDateString ()
- toLocaleTimeString ()
- getFullYear () GetMonth () GetDay ()
- New Date (): Gets the current time of the system
- GetHours () getminutes () getseconds ()
- setFullYear () setmonth () Setday () sethours () setminutes () setseconds ()
3.1.window Object
1. window.location
2. window.open
3. Window.history
Five. Javascript Dom Operation
- getElementById
- Getelementsbyname
- getElementsByTagName
- Assigning Values to text boxes
- Set check box radio button selected state
- Let DOM element get cursor
- Controlling the display and hiding of DOM elements
- DOM element Creation | add | Delete (optional)
Six. Javascript Event Handling
- Dom elements Common events load, click, DblClick, Blur, focus, change, mouse, KeyDown, KeyUp, MouseOver, mouseout
- The use of this in the event binding function, for example: <div onclick= "DisplayText (this);" ></div>
Seven. Javascript Timer
- setinterval function
- settimeout function
- clearinterval function
- cleartimeout function
JavaScript important knowledge points carding