JavaScript is a scripting language that will be executed wherever the browser downloads it. This feature will provide convenience for programming, but it can also easily make the program too messy and fragmented.
JS can be functionally divided into two parts - the framework part and the application part. The framework part provides the organization of js code, including defining global variables, namespace methods, etc., each page will Have the same or similar framework. The application part provides page function logic. Different pages will have different functions, and the codes in the application part of different pages are also different.
Give a unified entrance to the js code of the application part, that is: