Javascript key points of knowledge carding
Description
Javascript Process Control
- The data types commonly used in JS
- Use of the VAR keyword
- If–else If–else
- Switch
- While
- For
Javascript Common Functions
- 1. String Functions
- Substring
- IndexOf
- LastIndexOf
- CharAt
- Replace
- Split
- toLowerCase
- toUpperCase
- 2. Mathematical arithmetic functions
- 3. data type conversion Functions
- parseint
- Parsefloat
- Math.Abs
- Math.ceil
- Math.floor
- Math.Round
- Math.pow
- Math.random
Javascript dialog Box
- Alert Prompt dialog box
- Confirm Confirmation Dialog box
- Prompt Input dialog box
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
- 2. Time Objects
- toLocaleDateString ()
- toLocaleTimeString ()
- getFullYear () GetMonth () GetDay ()
- How to create an array object
- New Date (): Gets the current time of the system
GetHours () getminutes () getseconds ()
- setFullYear () setmonth () Setday ()
Sethours () setminutes () setseconds ()
- 3. window Object
- Window.location
- window.open
- Window.history
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)
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>
Javascript Timer
- setinterval function
- settimeout function
- clearinterval function
- cleartimeout function
JavaScript important knowledge points carding