1. Select
(1) Its selection event is onchange
(2) His option index can be obtained through value, which is a little easier than the Tab tab.
2. Common methods of arrays
(1) Adding elements
Push (): You can add one or more elements to the end of an array and return the length of the new array.
Unshift (): You can add one or more elements to the front of an array and return the length of the new array.
(2) Deleting an array element
Pop (): Deletes the last element value of the array and returns the element value
Shift (): Deletes the value of the first element of the array and returns the element value
(3) Contact (): Connect two or more arrays
Split (): String conversions to arrays
Syntax: array name. split (specify symbol); Specify the symbol: specific case analysis
Example: Var txt= "AA,A,BB,BBB"; Console.log (Txt.split (",")); Print array results: ["AA", "a", "BB", "BBB"]
Join (): Converts each element of an array to a string by specifying a symbol
Syntax: array name. Join (specify symbol); Specify symbol: +-*/space and so on.
Example: Var arr=[1,2,3]; Console.log (Arr.join ("-")); Print string Result: "The"
js--basic Knowledge (III.)