1. Empty the input tag when it is worthwhile to empty it with the HTML ("") and empty it with Val ("")
2. If the event is bound more than once, the callback function executes multiple times when the event is triggered, and it is best to write the function of the binding event separately, or to unbind it every time.
3.jquery Selector If you are returning an array of jquery objects, use each to do it, or if you are working directly on the array, you may only operate on the first object of a group, and no traversal will occur.
4. Case sensitive, such as if written if. ToString () was written as ToString (), touppercase written in toUpperCase
5.document.getelementbyid (""), the arguments in parentheses remember to enclose the quotation marks
6.setTimeout ("function", time of delay); function quotes
7. The traversal of an array is best done through a for loop, not through for-in, because for ... In is much more efficient than for. There is a performance overhead when calling the array length property, so it is best to assign the length property of the array to the variable to improve performance.
8. With regard to functions, this is the most important object in JavaScript, and we can pass it as a parameter. The simplest thing to do here is settimeout, the parameter of the function call, is actually a function.
9. Sequence of execution of the program:
Program execution, from top to bottom, if you encounter alert, the browser stops there and does not continue until you click OK. If the script statement is inside the head, alert is global, it is displayed first, and then the contents inside the body are loaded. If alert is inside a function, alert will only be effective if you call the function.
JavaScript several easy-to-click Records