1. When clearing the input tag is worth it, you cannot use html("") to clear it, you must use val("") to clear it.
2. If the event is bound multiple times, the callback function will be executed multiple times after the event is triggered. It is best to write all functions that bind the event separately, or when the binding must be repeated, unbind each time.
3.jquery selector If the returned jquery object array, each operation should be performed. Otherwise, if it is directly operated on the array, it may only operate on the first object of the array, and no traversal will occur.
4. Case sensitivity, such as if written as If. toString() is written as tostring(), toUpperCase is written as toUppercase
5.document.getElementById(""), remember to add quotes to the parameters in brackets
6.setTimeout("function", delay time); function with quotes
7. It is best to pass the for loop through the array, not for in, because for. . . The efficiency of in is much worse than for. At the same time, there will be a certain performance overhead when calling the array length attribute, so the best way is to first assign the array length attribute to the variable to improve performance.
8. Regarding functions, this is the most important object in javascript, and we can pass it as a parameter. The easiest thing here is setTimeout. The parameter of this function call is actually a function.
9. Program execution order:
The program execution, from top to bottom. If you encounter alert, the browser stops there and no longer continues to execute until you click OK. If the script statement is inside the head and alert is global, it will be displayed first, and then the content in the body will be loaded. If alert is inside the function, alert will only have an effect when you call the function.